#[repr(u32)]pub enum PixelFormat {
ARGB8888 = 0,
XRGB8888 = 1,
RGB565 = 2,
BGRA8888 = 3,
}Expand description
Formato de pixel suportado pelo sistema gráfico.
Define como os bytes de cor são organizados na memória.
Variants§
ARGB8888 = 0
Alpha-Red-Green-Blue (32-bit, formato padrão)
XRGB8888 = 1
Ignored-Red-Green-Blue (32-bit, sem alpha)
RGB565 = 2
Red-Green-Blue (16-bit, economia de memória)
BGRA8888 = 3
Blue-Green-Red-Alpha (32-bit, usado por alguns hardwares)
Implementations§
Source§impl PixelFormat
impl PixelFormat
Sourcepub const fn bytes_per_pixel(&self) -> u32
pub const fn bytes_per_pixel(&self) -> u32
Retorna o número de bytes por pixel para este formato.
Sourcepub const fn bits_per_pixel(&self) -> u32
pub const fn bits_per_pixel(&self) -> u32
Retorna o número de bits por pixel.
Trait Implementations§
Source§impl Clone for PixelFormat
impl Clone for PixelFormat
Source§fn clone(&self) -> PixelFormat
fn clone(&self) -> PixelFormat
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 PixelFormat
impl Debug for PixelFormat
Source§impl Default for PixelFormat
impl Default for PixelFormat
Source§fn default() -> PixelFormat
fn default() -> PixelFormat
Returns the “default value” for a type. Read more
Source§impl PartialEq for PixelFormat
impl PartialEq for PixelFormat
impl Copy for PixelFormat
impl Eq for PixelFormat
impl StructuralPartialEq for PixelFormat
Auto Trait Implementations§
impl Freeze for PixelFormat
impl RefUnwindSafe for PixelFormat
impl Send for PixelFormat
impl Sync for PixelFormat
impl Unpin for PixelFormat
impl UnwindSafe for PixelFormat
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