pub struct GradientStops { /* private fields */ }Implementations§
Source§impl GradientStops
impl GradientStops
pub fn new(stops: Vec<GradientStop>) -> GradientStops
pub fn solid(color: Color) -> GradientStops
pub fn two(from: Color, to: Color) -> GradientStops
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§fn clone(&self) -> GradientStops
fn clone(&self) -> GradientStops
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 moreSource§impl Debug for GradientStops
impl Debug for GradientStops
Source§impl Default for GradientStops
impl Default for GradientStops
Source§fn default() -> GradientStops
fn default() -> GradientStops
Returns the “default value” for a type. Read more
Source§impl From<Vec<GradientStop>> for GradientStops
impl From<Vec<GradientStop>> for GradientStops
Source§fn from(v: Vec<GradientStop>) -> GradientStops
fn from(v: Vec<GradientStop>) -> GradientStops
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