#[repr(packed(1))]pub struct LinearGradientPrimitive {
pub transform: [f32; 6],
pub start_position: [f32; 2],
pub end_position: [f32; 2],
pub stop: u32,
pub mask_head_and_spread: i32,
}Fields§
§transform: [f32; 6]A 2x3 column-major matrix, transform a vertex position to the texture position
start_position: [f32; 2]position of the start center
end_position: [f32; 2]position of the end center
stop: u32The color stop information, there are two parts:
- The high 16-bit index represents the start index of the color stop.
- The low 16-bit index represents the size of the color stop.
mask_head_and_spread: i32A mix of two 16-bit values:
- The high 16-bit index represents the head mask layer.
- The low 16-bit represents the spread method of the gradient. 0 for pad, 1 for reflect and 2 for repeat
Trait Implementations§
Source§impl AsBytes for LinearGradientPrimitive
impl AsBytes for LinearGradientPrimitive
Source§impl Clone for LinearGradientPrimitive
impl Clone for LinearGradientPrimitive
Source§fn clone(&self) -> LinearGradientPrimitive
fn clone(&self) -> LinearGradientPrimitive
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 moreSource§impl Debug for LinearGradientPrimitive
impl Debug for LinearGradientPrimitive
Source§impl PartialEq for LinearGradientPrimitive
impl PartialEq for LinearGradientPrimitive
impl Copy for LinearGradientPrimitive
impl StructuralPartialEq for LinearGradientPrimitive
Auto Trait Implementations§
impl Freeze for LinearGradientPrimitive
impl RefUnwindSafe for LinearGradientPrimitive
impl Send for LinearGradientPrimitive
impl Sync for LinearGradientPrimitive
impl Unpin for LinearGradientPrimitive
impl UnwindSafe for LinearGradientPrimitive
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more