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 moresource§impl Debug for RadialGradient
impl Debug for RadialGradient
source§impl PartialEq for RadialGradient
impl PartialEq for RadialGradient
source§fn eq(&self, other: &RadialGradient) -> bool
fn eq(&self, other: &RadialGradient) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for RadialGradient
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§
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