Enum font_kit::canvas::Format [−][src]
pub enum Format {
Rgba32,
Rgb24,
A8,
}The image format for the canvas.
Variants
Rgba32Premultiplied R8G8B8A8, little-endian.
Rgb24R8G8B8, little-endian.
A8A8.
Methods
impl Format[src]
impl Formatpub fn bits_per_pixel(self) -> u8[src]
pub fn bits_per_pixel(self) -> u8Returns 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) -> u8Returns 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) -> u8Returns 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) -> u8Returns the number of bytes per pixel that this image format corresponds to.
Trait Implementations
impl Clone for Format[src]
impl Clone for Formatfn clone(&self) -> Format[src]
fn clone(&self) -> FormatReturns 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 Formatimpl Debug for Format[src]
impl Debug for Formatfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for Format[src]
impl PartialEq for Format