Struct gfx_core::texture::ImageInfoCommon [−][src]
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: Size
yoffset: Size
zoffset: Size
width: Size
height: Size
depth: Size
format: F
Format of each texel.
mipmap: Level
Which mipmap to select.
Implementations
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.
impl ImageInfoCommon<Format>
[src][−]
pub fn get_byte_count(&self) -> usize
[src][−]
Get the total number of bytes.
Trait Implementations
impl<F: Clone> Clone for ImageInfoCommon<F>
[src][+]
impl<F: Copy> Copy for ImageInfoCommon<F>
[src]
impl<F: Debug> Debug for ImageInfoCommon<F>
[src][+]
impl<F: Eq> Eq for ImageInfoCommon<F>
[src]
impl<F: Hash> Hash for ImageInfoCommon<F>
[src][+]
impl<F: Ord> Ord for ImageInfoCommon<F>
[src][+]
impl<F: PartialEq> PartialEq<ImageInfoCommon<F>> for ImageInfoCommon<F>
[src][+]
impl<F: PartialOrd> PartialOrd<ImageInfoCommon<F>> for ImageInfoCommon<F>
[src][+]
impl<F> StructuralEq for ImageInfoCommon<F>
[src]
impl<F> StructuralPartialEq for ImageInfoCommon<F>
[src]
Auto Trait Implementations
impl<F> RefUnwindSafe for ImageInfoCommon<F> where
F: RefUnwindSafe,
F: RefUnwindSafe,
impl<F> Send for ImageInfoCommon<F> where
F: Send,
F: Send,
impl<F> Sync for ImageInfoCommon<F> where
F: Sync,
F: Sync,
impl<F> Unpin for ImageInfoCommon<F> where
F: Unpin,
F: Unpin,
impl<F> UnwindSafe for ImageInfoCommon<F> where
F: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,