Trait LedPixelShape

Source
pub trait LedPixelShape {
    // Required methods
    fn size() -> Size;
    fn pixel_index(point: Point) -> Option<usize>;

    // Provided method
    fn pixel_len() -> usize { ... }
}
Available on crate feature embedded-graphics-core only.
Expand description

LED pixel shape

Required Methods§

Source

fn size() -> Size

Physical size of the LED pixel equipment.

Source

fn pixel_index(point: Point) -> Option<usize>

Convert from point to the index. Returns None if it is out of the bounds.

Provided Methods§

Source

fn pixel_len() -> usize

Returns the number of pixels

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§

Source§

impl<const W: usize, const H: usize> LedPixelShape for LedPixelMatrix<W, H>