pub struct GradientRange {
pub x1: f32,
pub bias: [f32; 4],
pub scale: [f32; 4],
}
Expand description
An encoded ange between two color stops.
Fields§
§x1: f32
The end value of the range.
bias: [f32; 4]
A bias to apply when interpolating the color (in this case just the values of the start color of the gradient).
scale: [f32; 4]
The scale factors of the range. By calculating bias + x * factors (where x is between 0.0 and 1.0), we can interpolate between start and end color of the gradient range.
Trait Implementations§
Source§impl Clone for GradientRange
impl Clone for GradientRange
Source§fn clone(&self) -> GradientRange
fn clone(&self) -> GradientRange
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for GradientRange
impl RefUnwindSafe for GradientRange
impl Send for GradientRange
impl Sync for GradientRange
impl Unpin for GradientRange
impl UnwindSafe for GradientRange
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