#[repr(C)]pub struct ColorStop {
pub offset: f32,
pub palette_index: u16,
pub alpha: f32,
}Expand description
A color stop of a gradient.
Gradients passed to a PaintSink always have their stops normalized to
the range 0 to 1.
Fields§
§offset: f32The position of the stop along the gradient, from 0 to 1.
palette_index: u16The index of the color in a CPAL palette.
alpha: f32A multiplier applied to the alpha of the color.
Trait Implementations§
impl Copy for ColorStop
Source§impl From<ResolvedColorStop> for ColorStop
impl From<ResolvedColorStop> for ColorStop
Source§fn from(resolved_stop: ResolvedColorStop) -> Self
fn from(resolved_stop: ResolvedColorStop) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for ColorStop
Auto Trait Implementations§
impl Freeze for ColorStop
impl RefUnwindSafe for ColorStop
impl Send for ColorStop
impl Sync for ColorStop
impl Unpin for ColorStop
impl UnsafeUnpin for ColorStop
impl UnwindSafe for ColorStop
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