Struct tiny_skia::pipeline::GradientCtx
source · pub struct GradientCtx {
pub len: usize,
pub factors: Vec<GradientColor>,
pub biases: Vec<GradientColor>,
pub t_values: Vec<NormalizedF32>,
}
Fields§
§len: usize
This value stores the actual colors count.
factors
and biases
must store at least 16 values,
since this is the length of a lowp pipeline stage.
So any any value past len
is just zeros.
factors: Vec<GradientColor>
§biases: Vec<GradientColor>
§t_values: Vec<NormalizedF32>
Implementations§
source§impl GradientCtx
impl GradientCtx
pub fn push_const_color(&mut self, color: GradientColor)
Trait Implementations§
source§impl Clone for GradientCtx
impl Clone for GradientCtx
source§fn clone(&self) -> GradientCtx
fn clone(&self) -> GradientCtx
Returns a copy of the value. Read more
1.0.0 · 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 GradientCtx
impl Debug for GradientCtx
source§impl Default for GradientCtx
impl Default for GradientCtx
source§fn default() -> GradientCtx
fn default() -> GradientCtx
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GradientCtx
impl RefUnwindSafe for GradientCtx
impl Send for GradientCtx
impl Sync for GradientCtx
impl Unpin for GradientCtx
impl UnwindSafe for GradientCtx
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
)