pub struct Image<'a> { /* private fields */ }Expand description
A loaded image file.
Can be loaded as [FileBuf] from ROM with [load_file_buf]
and then cast using Into.
Implementations§
Source§impl<'a> Image<'a>
impl<'a> Image<'a>
Sourcepub const unsafe fn from_bytes(raw: &'a [u8]) -> Self
pub const unsafe fn from_bytes(raw: &'a [u8]) -> Self
Sourcepub const fn sub(&self, p: Point, s: Size) -> SubImage<'a>
pub const fn sub(&self, p: Point, s: Size) -> SubImage<'a>
Get a rectangle subregion of the image.
Sourcepub fn transparency(&self) -> Color
pub fn transparency(&self) -> Color
The color used for transparency. If no transparency, returns Color::None.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Image<'a>
impl<'a> RefUnwindSafe for Image<'a>
impl<'a> Send for Image<'a>
impl<'a> Sync for Image<'a>
impl<'a> Unpin for Image<'a>
impl<'a> UnwindSafe for Image<'a>
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