PixelArray

Trait PixelArray 

Source
pub trait PixelArray {
    // Required methods
    fn get(&self, index: usize) -> RGBA8;
    fn width(&self) -> usize;
    fn height(&self) -> usize;
    fn length(&self) -> usize;
    fn bytes_per_pixel() -> usize;
    fn has_alpha() -> bool;
}
Expand description

Trait for 2D-sized & indexed pixel storage

Required Methods§

Source

fn get(&self, index: usize) -> RGBA8

Source

fn width(&self) -> usize

Source

fn height(&self) -> usize

Source

fn length(&self) -> usize

Source

fn bytes_per_pixel() -> usize

Source

fn has_alpha() -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§