#[repr(C)]pub struct ImageVertex {
pub position: [f32; 2],
pub size: [f32; 2],
pub normalized_uv_pos: [f32; 2],
pub normalized_uv_size: [f32; 2],
pub transform: [f32; 6],
pub has_transform: u32,
}Fields§
§position: [f32; 2]The position of the top-left corner of the [Image] (before rotation)
in logical points.
size: [f32; 2]The size of the [Image] in logical points.
normalized_uv_pos: [f32; 2]The position of the top-left uv coordinate in the texture, normalized to
therange [0.0, 1.0]
By default this is set to [0.0, 0.0]
normalized_uv_size: [f32; 2]The size of the rect in the texture, normalized to the range [0.0, 1.0]
By default this is set to [1.0, 1.0]
transform: [f32; 6]A 2d transform represented by a column-major 3 by 3 matrix, compressed down to 3 by 2.
Note that size is not included in the transform.
has_transform: u32Whether or not to apply the transform matrix. This is used to optimize
images with no transformations.
Note that size is not included in the transform.
By default this is set to 0 (false).
Trait Implementations§
Source§impl Clone for ImageVertex
impl Clone for ImageVertex
Source§fn clone(&self) -> ImageVertex
fn clone(&self) -> ImageVertex
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 ImageVertex
impl Debug for ImageVertex
Source§impl Default for ImageVertex
impl Default for ImageVertex
Source§impl PartialEq for ImageVertex
impl PartialEq for ImageVertex
impl Copy for ImageVertex
impl Pod for ImageVertex
impl StructuralPartialEq for ImageVertex
Auto Trait Implementations§
impl Freeze for ImageVertex
impl RefUnwindSafe for ImageVertex
impl Send for ImageVertex
impl Sync for ImageVertex
impl Unpin for ImageVertex
impl UnwindSafe for ImageVertex
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.