Struct tiny_skia::LinearGradient
source · [−]pub struct LinearGradient { /* private fields */ }Expand description
A linear gradient shader.
Implementations
sourceimpl LinearGradient
impl LinearGradient
sourcepub fn new(
start: Point,
end: Point,
stops: Vec<GradientStop>,
mode: SpreadMode,
transform: Transform
) -> Option<Shader<'static>>
pub fn new(
start: Point,
end: Point,
stops: Vec<GradientStop>,
mode: SpreadMode,
transform: Transform
) -> Option<Shader<'static>>
Creates a new linear gradient shader.
Returns Shader::SolidColor when:
stops.len()== 1startandendare very close
Returns None when:
stopsis emptystart==endtransformis not invertible
Trait Implementations
sourceimpl Clone for LinearGradient
impl Clone for LinearGradient
sourcefn clone(&self) -> LinearGradient
fn clone(&self) -> LinearGradient
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl RefUnwindSafe for LinearGradient
impl Send for LinearGradient
impl Sync for LinearGradient
impl Unpin for LinearGradient
impl UnwindSafe for LinearGradient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more