#[repr(u8)]pub enum TexturePixelFormat {
Rgb = 0,
Rgba = 1,
RgbaPremultiplied = 2,
AlphaMap = 3,
SignedDistanceField = 4,
}
Expand description
The pixel format used for textures.
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 TexturePixelFormat
impl Clone for TexturePixelFormat
Source§fn clone(&self) -> TexturePixelFormat
fn clone(&self) -> TexturePixelFormat
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 TexturePixelFormat
impl Debug for TexturePixelFormat
Source§impl PartialEq for TexturePixelFormat
impl PartialEq for TexturePixelFormat
impl Copy for TexturePixelFormat
impl StructuralPartialEq for TexturePixelFormat
Auto Trait Implementations§
impl Freeze for TexturePixelFormat
impl RefUnwindSafe for TexturePixelFormat
impl Send for TexturePixelFormat
impl Sync for TexturePixelFormat
impl Unpin for TexturePixelFormat
impl UnwindSafe for TexturePixelFormat
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