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§
source§impl 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:
stops
is emptyradius
<= 0transform
is not invertible
Trait Implementations§
source§impl Clone for RadialGradient
impl Clone for RadialGradient
source§fn clone(&self) -> RadialGradient
fn clone(&self) -> RadialGradient
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more