pub struct LinearGradient {
pub begin: AlignmentGeometry,
pub end: AlignmentGeometry,
pub colors: Vec<Color>,
pub stops: Option<Vec<f32>>,
pub tile_mode: TileMode,
pub rotation: f32,
}Expand description
A gradient along a line, from begin to end (gradient.dart’s
LinearGradient). Unset, from the centre of the left side to the centre of the right.
Fields§
§begin: AlignmentGeometryWhere the first colour is.
end: AlignmentGeometryWhere the last colour is.
colors: Vec<Color>The colours, first to last.
stops: Option<Vec<f32>>Where each colour is, from 0 to 1, as many as there are colours; None spreads
them evenly.
tile_mode: TileModePast the ends.
rotation: f32A turn of the whole gradient about the box’s centre, in radians clockwise — the
reference’s GradientRotation.
Implementations§
Trait Implementations§
Source§impl Clone for LinearGradient
impl Clone for LinearGradient
Source§impl Debug for LinearGradient
impl Debug for LinearGradient
Source§impl From<LinearGradient> for Gradient
impl From<LinearGradient> for Gradient
Source§fn from(g: LinearGradient) -> Self
fn from(g: LinearGradient) -> Self
Converts to this type from the input type.
Source§impl PartialEq for LinearGradient
impl PartialEq for LinearGradient
impl StructuralPartialEq for LinearGradient
Auto Trait Implementations§
impl Freeze for LinearGradient
impl RefUnwindSafe for LinearGradient
impl Send for LinearGradient
impl Sync for LinearGradient
impl Unpin for LinearGradient
impl UnsafeUnpin for LinearGradient
impl UnwindSafe for LinearGradient
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