Enum font_kit::canvas::Format [−][src]
pub enum Format { Rgba32, Rgb24, A8, }
The image format for the canvas.
Variants
Rgba32
Premultiplied R8G8B8A8, little-endian.
Rgb24
R8G8B8, little-endian.
A8
A8.
Methods
impl Format
[src]
impl Format
pub fn bits_per_pixel(self) -> u8
[src]
pub fn bits_per_pixel(self) -> u8
Returns the number of bits per pixel that this image format corresponds to.
pub fn components_per_pixel(self) -> u8
[src]
pub fn components_per_pixel(self) -> u8
Returns the number of color channels per pixel that this image format corresponds to.
pub fn bits_per_component(self) -> u8
[src]
pub fn bits_per_component(self) -> u8
Returns the number of bits per color channel that this image format contains.
pub fn bytes_per_pixel(self) -> u8
[src]
pub fn bytes_per_pixel(self) -> u8
Returns the number of bytes per pixel that this image format corresponds to.
Trait Implementations
impl Clone for Format
[src]
impl Clone for Format
fn clone(&self) -> Format
[src]
fn clone(&self) -> Format
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for Format
[src]
impl Copy for Format
impl Debug for Format
[src]
impl Debug for Format
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Format
[src]
impl PartialEq for Format