pub struct SweepGradient {
pub center: AlignmentGeometry,
pub start_angle: f32,
pub end_angle: f32,
pub colors: Vec<Color>,
pub stops: Option<Vec<f32>>,
pub tile_mode: TileMode,
pub rotation: f32,
}Expand description
The three gradients and how they tile.
A gradient turning round a centre (gradient.dart’s SweepGradient): from
start_angle to end_angle, in radians clockwise from the right.
Fields§
§center: AlignmentGeometryThe centre. Unset, the box’s.
start_angle: f32Where the first colour is. Unset, 0, the right.
end_angle: f32Where the last colour is. Unset, a whole turn.
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.
rotation: f32A turn of the whole gradient about the box’s centre, in radians clockwise.
Implementations§
Source§impl SweepGradient
impl SweepGradient
Trait Implementations§
Source§impl Clone for SweepGradient
impl Clone for SweepGradient
Source§fn clone(&self) -> SweepGradient
fn clone(&self) -> SweepGradient
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 SweepGradient
impl Debug for SweepGradient
Source§impl From<SweepGradient> for Gradient
impl From<SweepGradient> for Gradient
Source§fn from(g: SweepGradient) -> Gradient
fn from(g: SweepGradient) -> Gradient
Converts to this type from the input type.
Source§impl PartialEq for SweepGradient
impl PartialEq for SweepGradient
impl StructuralPartialEq for SweepGradient
Auto Trait Implementations§
impl Freeze for SweepGradient
impl RefUnwindSafe for SweepGradient
impl Send for SweepGradient
impl Sync for SweepGradient
impl Unpin for SweepGradient
impl UnsafeUnpin for SweepGradient
impl UnwindSafe for SweepGradient
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