pub struct GradientLut { /* private fields */ }Expand description
Gradient color lookup table.
Builds a 256-entry (or custom size) color LUT from SVG-style color stops. Supports arbitrary numbers of stops at positions [0..1].
Port of C++ gradient_lut<ColorInterpolator, ColorLutSize>.
Implementations§
Source§impl GradientLut
impl GradientLut
Sourcepub fn new(lut_size: usize) -> Self
pub fn new(lut_size: usize) -> Self
Create a new gradient LUT with the specified size (default 256).
Sourcepub fn new_default() -> Self
pub fn new_default() -> Self
Create a new gradient LUT with default size of 256.
Sourcepub fn set_use_fast_interpolator(&mut self, fast: bool)
pub fn set_use_fast_interpolator(&mut self, fast: bool)
Set whether to use the fast DDA interpolator (default: true).
Sourcepub fn remove_all(&mut self)
pub fn remove_all(&mut self)
Remove all color stops.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GradientLut
impl RefUnwindSafe for GradientLut
impl Send for GradientLut
impl Sync for GradientLut
impl Unpin for GradientLut
impl UnsafeUnpin for GradientLut
impl UnwindSafe for GradientLut
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