pub enum Direction {
Angle(FloatValue),
FromTo(DirectionCorner, DirectionCorner),
}
Expand description
CSS direction (necessary for gradients). Can either be a fixed angle or a direction (“to right” / “to left”, etc.).
Variants§
Angle(FloatValue)
FromTo(DirectionCorner, DirectionCorner)
Implementations§
Source§impl Direction
impl Direction
Sourcepub fn to_points(&self, rect: &LayoutRect) -> (LayoutPoint, LayoutPoint)
pub fn to_points(&self, rect: &LayoutRect) -> (LayoutPoint, LayoutPoint)
Calculates the points of the gradient stops for angled linear gradients
Trait Implementations§
Source§impl Ord for Direction
impl Ord for Direction
Source§impl PartialOrd for Direction
impl PartialOrd for Direction
impl Copy for Direction
impl Eq for Direction
impl StructuralPartialEq for Direction
Auto Trait Implementations§
impl Freeze for Direction
impl RefUnwindSafe for Direction
impl Send for Direction
impl Sync for Direction
impl Unpin for Direction
impl UnwindSafe for Direction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)