pub struct GradientLut<T: FromF32Color> {
lut: Vec<[T; 4]>,
scale: f32,
}
Expand description
A lookup table for sampled gradient values.
Fields§
§lut: Vec<[T; 4]>
§scale: f32
Implementations§
Source§impl<T: FromF32Color> GradientLut<T>
impl<T: FromF32Color> GradientLut<T>
Sourcefn new<S: Simd>(simd: S, ranges: &[GradientRange]) -> Self
fn new<S: Simd>(simd: S, ranges: &[GradientRange]) -> Self
Create a new lookup table.
Sourcepub fn scale_factor(&self) -> f32
pub fn scale_factor(&self) -> f32
Get the scale factor by which to scale the parametric value to compute the correct lookup index.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for GradientLut<T>
impl<T> RefUnwindSafe for GradientLut<T>where
T: RefUnwindSafe,
impl<T> Send for GradientLut<T>where
T: Send,
impl<T> Sync for GradientLut<T>where
T: Sync,
impl<T> Unpin for GradientLut<T>where
T: Unpin,
impl<T> UnwindSafe for GradientLut<T>where
T: UnwindSafe,
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