[][src]Struct gfx_core::texture::ImageInfoCommon

pub struct ImageInfoCommon<F> {
    pub xoffset: Size,
    pub yoffset: Size,
    pub zoffset: Size,
    pub width: Size,
    pub height: Size,
    pub depth: Size,
    pub format: F,
    pub mipmap: Level,
}

Describes a subvolume of a texture, which image data can be uploaded into.

Fields

xoffset: Sizeyoffset: Sizezoffset: Sizewidth: Sizeheight: Sizedepth: Sizeformat: F

Format of each texel.

mipmap: Level

Which mipmap to select.

Methods

impl<F> ImageInfoCommon<F>[src]

pub fn get_texel_count(&self) -> usize[src]

Get the total number of texels.

pub fn convert<T>(&self, new_format: T) -> ImageInfoCommon<T>[src]

Convert into a differently typed format.

pub fn is_inside(&self, (w, h, d, aa): Dimensions) -> bool[src]

Check if it fits inside given dimensions.

Trait Implementations

impl<F: PartialEq> PartialEq<ImageInfoCommon<F>> for ImageInfoCommon<F>[src]

impl<F: PartialOrd> PartialOrd<ImageInfoCommon<F>> for ImageInfoCommon<F>[src]

impl<F: Eq> Eq for ImageInfoCommon<F>[src]

impl<F: Copy> Copy for ImageInfoCommon<F>[src]

impl<F: Ord> Ord for ImageInfoCommon<F>[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl<F: Clone> Clone for ImageInfoCommon<F>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<F: Debug> Debug for ImageInfoCommon<F>[src]

impl<F: Hash> Hash for ImageInfoCommon<F>[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl<F> Send for ImageInfoCommon<F> where
    F: Send

impl<F> Sync for ImageInfoCommon<F> where
    F: Sync

Blanket Implementations

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

impl<T> From for T[src]

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.