pub struct Gradient {
pub stops: Vec<Stop>,
pub angle: Option<f32>,
pub center: Option<[f32; 2]>,
pub radius: Option<f32>,
}Expand description
Colors spread over a gradient.
Fields§
§stops: Vec<Stop>Two or more colors, evenly spaced unless each says its offset in 0..=1.
angle: Option<f32>A linear gradient’s direction in degrees, as CSS: 0 upward, 90 rightward. A conic one’s start. Default 180 for linear (downward), 0 for conic.
center: Option<[f32; 2]>A radial or conic gradient’s centre. Default [0.5, 0.5].
radius: Option<f32>A radial gradient’s radius. Default 0.5.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Gradient
impl<'de> Deserialize<'de> for Gradient
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Gradient
Auto Trait Implementations§
impl Forget for Gradient
impl Freeze for Gradient
impl Move for Gradient
impl RefUnwindSafe for Gradient
impl Send for Gradient
impl Sync for Gradient
impl Unpin for Gradient
impl UnsafeUnpin for Gradient
impl UnwindSafe for Gradient
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