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
impl StructuralPartialEq for RadialGradient
Auto Trait Implementations§
impl Freeze for RadialGradient
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)