pub struct GradientStop {
pub offset: f32,
pub color: Color,
}Expand description
One gradient stop. offset is parametric along the gradient axis (0 at the
start, 1 at the end). A stored offset is unconstrained; packing clamps it to
0..=1 and forces it non-decreasing for the GPU, so a caller may set it
freely through GradientStops::as_mut_slice.
Fields§
§offset: f32§color: ColorTrait Implementations§
Source§impl Clone for GradientStop
impl Clone for GradientStop
impl Copy for GradientStop
Source§impl Debug for GradientStop
impl Debug for GradientStop
Source§impl Default for GradientStop
impl Default for GradientStop
Source§impl PartialEq for GradientStop
impl PartialEq for GradientStop
impl StructuralPartialEq for GradientStop
Auto 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