Struct tiny_skia::RadialGradient
source · [−]pub struct RadialGradient { /* private fields */ }Expand description
A radial gradient shader.
This is not SkRadialGradient like in Skia, but rather SkTwoPointConicalGradient
without the start radius.
Implementations
sourceimpl RadialGradient
impl RadialGradient
sourcepub fn new(
start: Point,
end: Point,
radius: f32,
stops: Vec<GradientStop>,
mode: SpreadMode,
transform: Transform
) -> Option<Shader<'static>>
pub fn new(
start: Point,
end: Point,
radius: f32,
stops: Vec<GradientStop>,
mode: SpreadMode,
transform: Transform
) -> Option<Shader<'static>>
Creates a new radial gradient shader.
Returns Shader::SolidColor when:
stops.len()== 1
Returns None when:
stopsis emptyradius<= 0transformis not invertible
Trait Implementations
sourceimpl Clone for RadialGradient
impl Clone for RadialGradient
sourcefn clone(&self) -> RadialGradient
fn clone(&self) -> RadialGradient
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 RadialGradient
impl Send for RadialGradient
impl Sync for RadialGradient
impl Unpin for RadialGradient
impl UnwindSafe for RadialGradient
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