#[repr(C, packed(1))]pub struct ImgPrimitive {
pub transform: [f32; 6],
pub img_start: [f32; 2],
pub img_size: [f32; 2],
pub mask_head_and_tex_idx: i32,
pub is_premultiplied: i32,
pub base_color: [f32; 4],
pub color_matrix: [f32; 16],
}Fields§
§transform: [f32; 6]A 2x3 column-major matrix, transform a vertex position to the image texture slice position.
img_start: [f32; 2]The origin of the image placed in texture.
img_size: [f32; 2]The size of the image image.
mask_head_and_tex_idx: i32This represents a mix of two 16-bit indices:
- The high 16-bit index represents the head mask layer. It is an i16.
- The low 16-bit index represents the texture. It is a u16.
is_premultiplied: i321 for premultiplied alpha, 0 for non-premultiplied alpha
base_color: [f32; 4]the final pix color will be color * color_matrix + base_color
color_matrix: [f32; 16]the final pix color will be color * color_matrix + base_color
Trait Implementations§
Source§impl AsBytes for ImgPrimitive
impl AsBytes for ImgPrimitive
Source§impl Clone for ImgPrimitive
impl Clone for ImgPrimitive
Source§fn clone(&self) -> ImgPrimitive
fn clone(&self) -> ImgPrimitive
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 PartialEq for ImgPrimitive
impl PartialEq for ImgPrimitive
impl Copy for ImgPrimitive
impl StructuralPartialEq for ImgPrimitive
Auto Trait Implementations§
impl Freeze for ImgPrimitive
impl RefUnwindSafe for ImgPrimitive
impl Send for ImgPrimitive
impl Sync for ImgPrimitive
impl Unpin for ImgPrimitive
impl UnsafeUnpin for ImgPrimitive
impl UnwindSafe for ImgPrimitive
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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