#[repr(C)]pub struct ColorStop {
pub offset: f32,
pub palette_index: u16,
pub alpha: f32,
}
Expand description
A color stop of a gradient.
All gradient callbacks of ColorPainter
normalize color stops to be in the range of 0
to 1.
Fields§
§offset: f32
§palette_index: u16
Specifies a color from the CPAL
table.
alpha: f32
Additional alpha value, to be multiplied with the color above before use.
Trait Implementations§
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 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)