#[repr(C, align(16))]pub struct GpuEncodedImage {
pub image_params: u32,
pub image_size: u32,
pub image_offset: u32,
pub transform: [f32; 6],
pub tint: u32,
pub tint_mode: u32,
pub image_padding: u32,
}Expand description
An encoded image paint.
Fields§
§image_params: u32Packed sampling quality, extend modes and atlas index:
bits 6-13 atlas_index, bits 4-5 extend_y, bits 2-3 extend_x,
bits 0-1 quality.
image_size: u32Packed image width and height.
image_offset: u32Offset of the image within the atlas texture, in pixels.
transform: [f32; 6]Transform matrix [a, b, c, d, tx, ty].
tint: u32Premultiplied tint color, packed as RGBA8 unorm.
tint_mode: u32Tint mode.
image_padding: u32Transparent padding pixels around the image in the atlas.
Implementations§
Trait Implementations§
Source§impl Clone for GpuEncodedImage
impl Clone for GpuEncodedImage
impl Copy for GpuEncodedImage
Source§impl Debug for GpuEncodedImage
impl Debug for GpuEncodedImage
impl Pod for GpuEncodedImage
Auto Trait Implementations§
impl Freeze for GpuEncodedImage
impl RefUnwindSafe for GpuEncodedImage
impl Send for GpuEncodedImage
impl Sync for GpuEncodedImage
impl Unpin for GpuEncodedImage
impl UnsafeUnpin for GpuEncodedImage
impl UnwindSafe for GpuEncodedImage
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.