Trait ddsfile::DataFormat [] [src]

pub trait DataFormat {
    fn get_pitch(&self, width: u32) -> Option<u32>;
fn get_bits_per_pixel(&self) -> Option<u8>;
fn get_block_size(&self) -> Option<u32>;
fn get_fourcc(&self) -> Option<FourCC>;
fn requires_extension(&self) -> bool; fn get_pitch_height(&self) -> u32 { ... }
fn get_minimum_mipmap_size_in_bytes(&self) -> Option<u32> { ... } }

Required Methods

This gets the number of bytes required to store one row of data

This gets the number of bits required to store a single pixel. It is only defined for uncompressed formats

This gets a block compression format's block size, and is only defined for compressed formats

Get the fourcc code for this format, if known

Returns true if the DX10 extention is required to use this format.

Provided Methods

This gets the height of each row of data. Normally it is 1, but for block compressed textures, each row is 4 pixels high.

This gets the minimum mipmap size in bytes. Even if they go all the way down to 1x1, there is a minimum number of bytes based on bits per pixel or blocksize.

Implementors