[][src]Struct ddsfile::Header

pub struct Header {
    pub height: u32,
    pub width: u32,
    pub pitch: Option<u32>,
    pub linear_size: Option<u32>,
    pub depth: Option<u32>,
    pub mip_map_count: Option<u32>,
    pub spf: PixelFormat,
    pub caps: Caps,
    pub caps2: Caps2,
    // some fields omitted
}

Fields

height: u32

Surface height (in pixels)

width: u32

Surface width (in pixels)

pitch: Option<u32>

The pitch or number of bytes per scan line in an uncompressed texture;

linear_size: Option<u32>

The total number of bytes in a top level texture for a compressed texture

depth: Option<u32>

Depth of a volume texture (in pixels)

mip_map_count: Option<u32>

Number of mipmap levels

spf: PixelFormat

The pixel format

caps: Caps

Specifies the complexity of the surfaces stored.

caps2: Caps2

Additional detail about the surfaces stored

Methods

impl Header[src]

pub fn new_d3d(
    height: u32,
    width: u32,
    depth: Option<u32>,
    format: D3DFormat,
    mipmap_levels: Option<u32>,
    caps2: Option<Caps2>
) -> Result<Header, Error>
[src]

pub fn new_dxgi(
    height: u32,
    width: u32,
    depth: Option<u32>,
    format: DxgiFormat,
    mipmap_levels: Option<u32>,
    array_layers: Option<u32>,
    caps2: Option<Caps2>
) -> Result<Header, Error>
[src]

pub fn read<R: Read>(r: &mut R) -> Result<Header, Error>[src]

pub fn write<W: Write>(&self, w: &mut W) -> Result<(), Error>[src]

Trait Implementations

impl Clone for Header[src]

impl Default for Header[src]

impl Debug for Header[src]

Auto Trait Implementations

impl Send for Header

impl Sync for Header

impl Unpin for Header

impl UnwindSafe for Header

impl RefUnwindSafe for Header

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]