pub struct LinearGradient {
pub start: Point,
pub end: Point,
pub interpolation: ColorInterpolation,
pub stops: GradientStops,
}Fields§
§start: PointRelative coordinates where (0, 0) is the top-left of the primitive.
end: Point§interpolation: ColorInterpolation§stops: GradientStopsImplementations§
Source§impl LinearGradient
impl LinearGradient
pub fn new<const N: usize>( start: Point, end: Point, interpolation: ColorInterpolation, stops: [GradientStop; N], ) -> Result<Self, GradientError>
pub fn with_stops( start: Point, end: Point, interpolation: ColorInterpolation, stops: GradientStops, ) -> Self
Trait Implementations§
Source§impl Clone for LinearGradient
impl Clone for LinearGradient
Source§fn clone(&self) -> LinearGradient
fn clone(&self) -> LinearGradient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LinearGradient
impl Debug for LinearGradient
Source§impl PartialEq for LinearGradient
impl PartialEq for LinearGradient
impl StructuralPartialEq for LinearGradient
Auto Trait Implementations§
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