pub struct GradientStop {
pub position: u32,
pub color: String,
pub transparency: Option<u32>,
}Expand description
A color stop in a gradient
Fields§
§position: u32Position (0-100000, where 100000 = 100%)
color: StringColor (RGB hex)
transparency: Option<u32>Transparency (0-100000, where 100000 = fully transparent)
Implementations§
Source§impl GradientStop
impl GradientStop
Sourcepub fn with_transparency(self, percent: u32) -> Self
pub fn with_transparency(self, percent: u32) -> Self
Set transparency (0-100 percent)
Trait Implementations§
Source§impl Clone for GradientStop
impl Clone for GradientStop
Source§fn clone(&self) -> GradientStop
fn clone(&self) -> GradientStop
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 moreAuto Trait Implementations§
impl Freeze for GradientStop
impl RefUnwindSafe for GradientStop
impl Send for GradientStop
impl Sync for GradientStop
impl Unpin for GradientStop
impl UnsafeUnpin for GradientStop
impl UnwindSafe for GradientStop
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