pub struct LinearGradient(pub Gradient);Expand description
A linear gradient in f64 authoring coordinates.
Tuple Fields§
§0: GradientImplementations§
Source§impl LinearGradient
impl LinearGradient
Sourcepub fn stop(self, position: f64, color: Color) -> Self
pub fn stop(self, position: f64, color: Color) -> Self
Appends a sorted color stop; invalid/excessive inputs fail recording.
Sourcepub fn space(self, space: GradientSpace) -> Self
pub fn space(self, space: GradientSpace) -> Self
Selects the interpolation space.
Sourcepub fn units(self, units: GradientUnits) -> Self
pub fn units(self, units: GradientUnits) -> Self
Selects object-relative or local user-space coordinates.
Sourcepub fn extend(self, extend: GradientExtend) -> Self
pub fn extend(self, extend: GradientExtend) -> Self
Selects pad/repeat/reflect outside the color interval.
Trait Implementations§
Source§impl Clone for LinearGradient
impl Clone for LinearGradient
Source§impl Debug for LinearGradient
impl Debug for LinearGradient
Source§impl From<LinearGradient> for Paint
impl From<LinearGradient> for Paint
Source§fn from(value: LinearGradient) -> Self
fn from(value: LinearGradient) -> Self
Converts to this type from the input type.
Source§impl PartialEq for LinearGradient
impl PartialEq for LinearGradient
impl StructuralPartialEq for LinearGradient
Auto Trait Implementations§
impl Forget for LinearGradient
impl Freeze for LinearGradient
impl RefUnwindSafe for LinearGradient
impl Send for LinearGradient
impl Sync for LinearGradient
impl Unpin for LinearGradient
impl UnsafeUnpin for LinearGradient
impl UnwindSafe for LinearGradient
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