pub enum CompressionVariant {
BC7(BC7Settings),
}Expand description
Block compression variants supported by this crate.
Variants§
BC7(BC7Settings)
BC7 compression with smooth alpha (RGBA)
Implementations§
Source§impl CompressionVariant
impl CompressionVariant
Sourcepub const fn bytes_per_row(self, width: u32) -> u32
pub const fn bytes_per_row(self, width: u32) -> u32
Returns the bytes per row for the given width.
The width is used to calculate how many blocks are needed per row, which is then multiplied by the block size. Width is rounded up to the nearest multiple of 4.
Sourcepub const fn blocks_byte_size(self, width: u32, height: u32) -> usize
pub const fn blocks_byte_size(self, width: u32, height: u32) -> usize
Returns the byte size required for storing compressed blocks for the given dimensions.
The size is calculated based on the block compression format and rounded up dimensions. Width and height are rounded up to the nearest multiple of 4.
Trait Implementations§
Source§impl Clone for CompressionVariant
impl Clone for CompressionVariant
Source§fn clone(&self) -> CompressionVariant
fn clone(&self) -> CompressionVariant
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompressionVariant
impl Debug for CompressionVariant
Source§impl Hash for CompressionVariant
Available on crate features bc15 or bc6h or bc7 only.
impl Hash for CompressionVariant
Available on crate features
bc15 or bc6h or bc7 only.Source§impl PartialEq for CompressionVariant
Available on crate features bc15 or bc6h or bc7 only.
impl PartialEq for CompressionVariant
Available on crate features
bc15 or bc6h or bc7 only.impl Copy for CompressionVariant
impl Eq for CompressionVariant
Available on crate features
bc15 or bc6h or bc7 only.Auto Trait Implementations§
impl Freeze for CompressionVariant
impl RefUnwindSafe for CompressionVariant
impl Send for CompressionVariant
impl Sync for CompressionVariant
impl Unpin for CompressionVariant
impl UnwindSafe for CompressionVariant
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more