Struct tiny_skia::RadialGradient [−][src]
A radial gradient shader.
This is not SkRadialGradient
like in Skia, but rather SkTwoPointConicalGradient
without the start radius.
Implementations
impl RadialGradient
[src]
pub fn new(
start: Point,
end: Point,
radius: f32,
stops: Vec<GradientStop>,
mode: SpreadMode,
transform: Transform
) -> Option<Shader<'static>>
[src]
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
impl Clone for RadialGradient
[src]
fn clone(&self) -> RadialGradient
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for RadialGradient
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,