pub trait Image: Sized {
// Required methods
fn width(&self) -> u16;
fn height(&self) -> u16;
fn color_at(&self, x: u16, y: u16) -> Option<Color>;
unsafe fn color_at_unchecked(&self, x: u16, y: u16) -> Color;
fn to_raw_image(&self) -> RawImage;
}
Required Methods§
sourceunsafe fn color_at_unchecked(&self, x: u16, y: u16) -> Color
unsafe fn color_at_unchecked(&self, x: u16, y: u16) -> Color
Get the color at the given coordinates skipping bound checks
Safety
The caller is responsible to ensure that 0 <= x < width and 0 <= y < height.
sourcefn to_raw_image(&self) -> RawImage
fn to_raw_image(&self) -> RawImage
Convert this image trait object to a raw image