pub struct ImageSize {
pub width: u32,
pub height: u32,
pub x_offset: u32,
pub y_offset: u32,
pub tile_width: u32,
pub tile_height: u32,
pub tile_x_offset: u32,
pub tile_y_offset: u32,
pub num_components: u16,
pub components: Vec<ComponentSize>,
}Expand description
Image and tile size parameters from SIZ marker
Fields§
§width: u32Reference grid width
height: u32Reference grid height
x_offset: u32Horizontal offset
y_offset: u32Vertical offset
tile_width: u32Tile width
tile_height: u32Tile height
tile_x_offset: u32Tile horizontal offset
tile_y_offset: u32Tile vertical offset
num_components: u16Number of components
components: Vec<ComponentSize>Component parameters
Implementations§
Source§impl ImageSize
impl ImageSize
Sourcepub fn num_tiles_x(&self) -> u32
pub fn num_tiles_x(&self) -> u32
Calculate number of tiles in horizontal direction
Sourcepub fn num_tiles_y(&self) -> u32
pub fn num_tiles_y(&self) -> u32
Calculate number of tiles in vertical direction
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ImageSize
impl RefUnwindSafe for ImageSize
impl Send for ImageSize
impl Sync for ImageSize
impl Unpin for ImageSize
impl UnsafeUnpin for ImageSize
impl UnwindSafe for ImageSize
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