pub struct ImageInfo {
pub transform: Transform,
pub width: u32,
pub height: u32,
pub stride: u32,
pub pixel_format: PixelFormat,
pub color_space: ColorSpace,
pub tiling: Tiling,
pub alpha_format: AlphaFormat,
}
Expand description
Information about a graphical image (texture) including its format and size.
Fields§
§transform: Transform
Specifies if the image should be mirrored before displaying.
width: u32
The width and height of the image in pixels.
height: u32
§stride: u32
The number of bytes per row in the image buffer.
pixel_format: PixelFormat
The pixel format of the image.
color_space: ColorSpace
The pixel color space.
tiling: Tiling
The pixel arrangement in memory.
alpha_format: AlphaFormat
Specifies the interpretion of the alpha channel, if one exists.
Trait Implementations§
Source§impl<D: ResourceDialect> Decode<ImageInfo, D> for ImageInfo
impl<D: ResourceDialect> Decode<ImageInfo, D> for ImageInfo
Source§impl<D: ResourceDialect, T0: Encode<Transform, D>, T1: Encode<u32, D>, T2: Encode<u32, D>, T3: Encode<u32, D>, T4: Encode<PixelFormat, D>, T5: Encode<ColorSpace, D>, T6: Encode<Tiling, D>, T7: Encode<AlphaFormat, D>> Encode<ImageInfo, D> for (T0, T1, T2, T3, T4, T5, T6, T7)
impl<D: ResourceDialect, T0: Encode<Transform, D>, T1: Encode<u32, D>, T2: Encode<u32, D>, T3: Encode<u32, D>, T4: Encode<PixelFormat, D>, T5: Encode<ColorSpace, D>, T6: Encode<Tiling, D>, T7: Encode<AlphaFormat, D>> Encode<ImageInfo, D> for (T0, T1, T2, T3, T4, T5, T6, T7)
Source§impl Ord for ImageInfo
impl Ord for ImageInfo
Source§impl PartialOrd for ImageInfo
impl PartialOrd for ImageInfo
Source§impl TypeMarker for ImageInfo
impl TypeMarker for ImageInfo
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for ImageInfo
impl ValueTypeMarker for ImageInfo
impl Copy for ImageInfo
impl Eq for ImageInfo
impl Persistable for ImageInfo
impl StructuralPartialEq for ImageInfo
Auto Trait Implementations§
impl Freeze for ImageInfo
impl RefUnwindSafe for ImageInfo
impl Send for ImageInfo
impl Sync for ImageInfo
impl Unpin for ImageInfo
impl UnwindSafe for ImageInfo
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
The marker type to use when the body is at the top-level.
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
The marker type to use when the body is nested in a result union.
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)