#[repr(u8)]pub enum PixelFormat {
Rgb = 0,
Rgba = 1,
RgbaPremultiplied = 2,
AlphaMap = 3,
SignedDistanceField = 4,
}
Expand description
The pixel format of a StaticTexture
Variants§
Rgb = 0
red, green, blue. 24bits.
Rgba = 1
Red, green, blue, alpha. 32bits.
RgbaPremultiplied = 2
Red, green, blue, alpha. 32bits. The color are premultiplied by alpha
AlphaMap = 3
Alpha map. 8bits. Each pixel is an alpha value. The color is specified separately.
SignedDistanceField = 4
Distance field. 8bit interpreted as i8. The range is such that i8::MIN corresponds to 3 pixels outside of the shape, and i8::MAX corresponds to 3 pixels inside the shape. The array must be width * height +1 bytes long. (the extra bit is read but never used)
Implementations§
Trait Implementations§
Source§impl Clone for PixelFormat
impl Clone for PixelFormat
Source§fn clone(&self) -> PixelFormat
fn clone(&self) -> PixelFormat
Returns a copy 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 PartialEq for PixelFormat
impl PartialEq for PixelFormat
impl Copy 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