Enum bevy_retrograde::core::image::ColorType [−]
pub enum ColorType { L8, La8, Rgb8, Rgba8, L16, La16, Rgb16, Rgba16, Bgr8, Bgra8, // some variants omitted }
Expand description
An enumeration over supported color types and bit depths
Variants
Pixel is 8-bit luminance
Pixel is 8-bit luminance with an alpha channel
Pixel contains 8-bit R, G and B channels
Pixel is 8-bit RGB with an alpha channel
Pixel is 16-bit luminance
Pixel is 16-bit luminance with an alpha channel
Pixel is 16-bit RGB
Pixel is 16-bit RGBA
Pixel contains 8-bit B, G and R channels
Pixel is 8-bit BGR with an alpha channel
Implementations
impl ColorType
impl ColorType
pub fn bytes_per_pixel(self) -> u8
pub fn bytes_per_pixel(self) -> u8
Returns the number of bytes contained in a pixel of ColorType
c
pub fn bits_per_pixel(self) -> u16
pub fn bits_per_pixel(self) -> u16
Returns the number of bits contained in a pixel of ColorType
c
(which will always be
a multiple of 8).
pub fn channel_count(self) -> u8
pub fn channel_count(self) -> u8
Returns the number of color channels that make up this pixel
Trait Implementations
impl From<ColorType> for ExtendedColorType
impl From<ColorType> for ExtendedColorType
pub fn from(c: ColorType) -> ExtendedColorType
pub fn from(c: ColorType) -> ExtendedColorType
Performs the conversion.
impl StructuralEq for ColorType
impl StructuralPartialEq for ColorType
Auto Trait Implementations
impl RefUnwindSafe for ColorType
impl UnwindSafe for ColorType
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
impl<T> DynHash for T where
T: DynEq + Hash,
impl<T> DynHash for T where
T: DynEq + Hash,
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn clone_type_data(&self) -> Box<dyn TypeData + 'static, Global>
pub fn vzip(self) -> V