pub trait Layout {
// Required methods
fn map(&self, p: Point) -> Option<usize>;
fn size(&self) -> Size;
}
Expand description
Trait that represents a certain type of LED matrix.
The map() function shall fix any x y coordinate mismatch. Mismatch means the matrix might display the result being drawn in mirrored or otherwise incorrect ways due to the LEDs order on the PCB. Grid type matrixes (like 2x2 of 1x4 grid of 8x8 matrixes) should be also handled using this trait.