pub struct ImageResource {
pub width: u16,
pub height: u16,
pub atlas_id: AtlasId,
pub offset: [u16; 2],
pub padding: u16,
atlas_alloc_id: AllocId,
}Expand description
Represents an image resource for rendering.
Fields§
§width: u16The width of the image.
height: u16The height of the image.
atlas_id: AtlasIdThe Id of the atlas containing this image.
offset: [u16; 2]The offset of the image within its atlas (does not include padding, i.e. it points to the position of the first actual top-left pixel).
padding: u16The number of transparent padding pixels around the image in the atlas.
atlas_alloc_id: AllocIdThe atlas allocation ID for deallocation.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ImageResource
impl RefUnwindSafe for ImageResource
impl Send for ImageResource
impl Sync for ImageResource
impl Unpin for ImageResource
impl UnsafeUnpin for ImageResource
impl UnwindSafe for ImageResource
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