pub struct LinearGradient { /* private fields */ }Expand description
A linear gradient along the segment start–end.
Implementations§
Source§impl LinearGradient
impl LinearGradient
Sourcepub fn new(
start: Point,
end: Point,
stops: Vec<GradientStop>,
spread: SpreadMode,
transform: Transform,
) -> Option<Shader>
pub fn new( start: Point, end: Point, stops: Vec<GradientStop>, spread: SpreadMode, transform: Transform, ) -> Option<Shader>
Creates a linear gradient. None if there are fewer than two stops or
the transform matrix is singular.
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 moreAuto 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