Struct gfx::texture::ImageInfoCommon [−][src]
pub struct ImageInfoCommon<F> { pub xoffset: u16, pub yoffset: u16, pub zoffset: u16, pub width: u16, pub height: u16, pub depth: u16, pub format: F, pub mipmap: u8, }
Describes a subvolume of a texture, which image data can be uploaded into.
Fields
xoffset: u16
yoffset: u16
zoffset: u16
width: u16
height: u16
depth: u16
format: F
Format of each texel.
mipmap: u8
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, (u16, u16, u16, AaMode)) -> 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 for ImageInfoCommon<F> where
F: Clone,
[src]
F: Clone,
pub fn clone(&self) -> ImageInfoCommon<F>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<F> Copy for ImageInfoCommon<F> where
F: Copy,
[src]
F: Copy,
impl<F> Debug for ImageInfoCommon<F> where
F: Debug,
[src]
F: Debug,
impl<F> Eq for ImageInfoCommon<F> where
F: Eq,
[src]
F: Eq,
impl<F> Hash for ImageInfoCommon<F> where
F: Hash,
[src]
F: Hash,
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<F> Ord for ImageInfoCommon<F> where
F: Ord,
[src]
F: Ord,
pub fn cmp(&self, other: &ImageInfoCommon<F>) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]
pub fn max(self, other: Self) -> Self#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]
pub fn min(self, other: Self) -> Self#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
#[must_use]
pub fn clamp(self, min: Self, max: Self) -> Selfimpl<F> PartialEq<ImageInfoCommon<F>> for ImageInfoCommon<F> where
F: PartialEq<F>,
[src]
F: PartialEq<F>,
pub fn eq(&self, other: &ImageInfoCommon<F>) -> bool
[src]
pub fn ne(&self, other: &ImageInfoCommon<F>) -> bool
[src]
impl<F> PartialOrd<ImageInfoCommon<F>> for ImageInfoCommon<F> where
F: PartialOrd<F>,
[src]
F: PartialOrd<F>,
pub fn partial_cmp(&self, other: &ImageInfoCommon<F>) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn lt(&self, other: &Rhs) -> bool#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn le(&self, other: &Rhs) -> bool#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn gt(&self, other: &Rhs) -> bool#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
pub fn ge(&self, other: &Rhs) -> boolimpl<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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
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,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,