pub struct GradientStops { /* private fields */ }Implementations§
Source§impl GradientStops
impl GradientStops
pub fn new(stops: Vec<GradientStop>) -> Self
pub fn solid(color: Color) -> Self
pub fn two(from: Color, to: Color) -> Self
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn stops(&self) -> &[GradientStop]
pub fn for_gpu(&self) -> Option<([[f32; 4]; 4], [f32; 4], u32)>
pub fn cache_key(&self) -> u64
pub fn sample_linear(&self, t: f32) -> [f32; 4]
pub fn bake_lut256(&self) -> Vec<u8> ⓘ
Trait Implementations§
Source§impl Clone for GradientStops
impl Clone for GradientStops
Source§impl Debug for GradientStops
impl Debug for GradientStops
Source§impl Default for GradientStops
impl Default for GradientStops
Source§impl From<Vec<GradientStop>> for GradientStops
impl From<Vec<GradientStop>> for GradientStops
Source§fn from(v: Vec<GradientStop>) -> Self
fn from(v: Vec<GradientStop>) -> Self
Converts to this type from the input type.
Source§impl PartialEq for GradientStops
impl PartialEq for GradientStops
impl StructuralPartialEq for GradientStops
Auto Trait Implementations§
impl Freeze for GradientStops
impl RefUnwindSafe for GradientStops
impl Send for GradientStops
impl Sync for GradientStops
impl Unpin for GradientStops
impl UnsafeUnpin for GradientStops
impl UnwindSafe for GradientStops
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