Skip to main content

Pixmap

Trait Pixmap 

Source
pub trait Pixmap {
    // Required methods
    fn width(&self) -> u32;
    fn height(&self) -> u32;
    fn pixel(&self, x: u32, y: u32) -> Option<Rgb>;
}
Expand description

A small pixel image with transparency (prop art).

Required Methods§

Source

fn width(&self) -> u32

Source

fn height(&self) -> u32

Source

fn pixel(&self, x: u32, y: u32) -> Option<Rgb>

Colour of pixel (x, y), or None when transparent.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Pixmap for PixelMap

Source§

fn width(&self) -> u32

Source§

fn height(&self) -> u32

Source§

fn pixel(&self, x: u32, y: u32) -> Option<Rgb>

Implementors§