pub struct RadialGradient {
pub center: UnitPoint,
pub radius: f64,
pub stops: Vec<(f64, Color)>,
}Expand description
A radial gradient (docs/shapes.md §3.2 / §7): color stops from center outward. Both the
center and the radius live in the unit space of the filled shape’s bounding box, so the
gradient stretches into an ELLIPSE when the bounds aren’t square (the XAML relative-brush
behavior; the other backends reproduce it with a local matrix on a circular gradient). A
radius of 0.5 from the default center touches the edge midpoints of the bounds.
Fields§
§center: UnitPoint§radius: f64§stops: Vec<(f64, Color)>Implementations§
Trait Implementations§
Source§impl Clone for RadialGradient
impl Clone for RadialGradient
Source§fn clone(&self) -> RadialGradient
fn clone(&self) -> RadialGradient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 From<RadialGradient> for Paint
impl From<RadialGradient> for Paint
Source§fn from(g: RadialGradient) -> Paint
fn from(g: RadialGradient) -> Paint
Converts to this type from the input type.
Source§impl PartialEq for RadialGradient
impl PartialEq for RadialGradient
Source§fn eq(&self, other: &RadialGradient) -> bool
fn eq(&self, other: &RadialGradient) -> bool
Tests for
self and other values to be equal, and is used by ==.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 UnsafeUnpin for RadialGradient
impl UnwindSafe for RadialGradient
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more