pub struct RadialGradient {
pub center: AlignmentGeometry,
pub radius: f32,
pub colors: Vec<Color>,
pub stops: Option<Vec<f32>>,
pub tile_mode: TileMode,
pub focal: Option<AlignmentGeometry>,
pub focal_radius: f32,
pub rotation: f32,
}Expand description
The three gradients and how they tile.
A gradient round a centre (gradient.dart’s RadialGradient): the first colour at
center, the last on the circle radius round it. With a focal point, the first colour
is on the circle focal_radius round that point instead, and the gradient runs between
the two circles.
Fields§
§center: AlignmentGeometryThe centre. Unset, the box’s.
radius: f32The radius, as a fraction of the box’s shorter side. Unset, a half.
colors: Vec<Color>The colours, first to last.
stops: Option<Vec<f32>>Where each colour is; None spreads them evenly.
tile_mode: TileModePast the ends.
focal: Option<AlignmentGeometry>Where the first colour’s circle is centred, when not at center.
focal_radius: f32The first colour’s circle’s radius, as a fraction of the shorter side.
rotation: f32A turn of the whole gradient about the box’s centre, in radians clockwise.
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 Gradient
impl From<RadialGradient> for Gradient
Source§fn from(g: RadialGradient) -> Gradient
fn from(g: RadialGradient) -> Gradient
Converts to this type from the input type.
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 UnsafeUnpin 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