pub trait PixelRemapper {
const VIRT_ROWS: usize;
const VIRT_COLS: usize;
const FB_ROWS: usize;
const FB_COLS: usize;
// Required method
fn remap_xy(x: usize, y: usize) -> (usize, usize);
// Provided methods
fn remap<C: PixelColor>(pixel: Pixel<C>) -> Pixel<C> { ... }
fn remap_point(point: Point) -> Point { ... }
fn virtual_size() -> (usize, usize) { ... }
fn fb_size() -> (usize, usize) { ... }
}Expand description
Trait for pixel re-mappers
Implementors of this trait will remap x,y coordinates from a virtual panel to the actual framebuffer used to drive the panels
§Type Parameters
PANEL_ROWS- Number of rows in a single panelPANEL_COLS- Number of columns in a single panelTILE_ROWS- Number of panels stacked verticallyTILE_COLS- Number of panels stacked horizontally
Required Associated Constants§
Required Methods§
Provided Methods§
Sourcefn remap<C: PixelColor>(pixel: Pixel<C>) -> Pixel<C>
fn remap<C: PixelColor>(pixel: Pixel<C>) -> Pixel<C>
Remap a virtual pixel to a framebuffer pixel
Sourcefn remap_point(point: Point) -> Point
fn remap_point(point: Point) -> Point
Remap a virtual point to a framebuffer point
Sourcefn virtual_size() -> (usize, usize)
fn virtual_size() -> (usize, usize)
Size of the virtual panel
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".