pub trait Pixel: Copy + Sized {
type Image: Sized + 'static;
type Canvas: Canvas<Pixel = Self, Image = Self::Image>;
// Required method
fn default_color(color: Color) -> Self;
// Provided method
fn default_unit_size() -> (u32, u32) { ... }
}
Expand description
Abstraction of an image pixel.
Required Associated Types§
Required Methods§
sourcefn default_color(color: Color) -> Self
fn default_color(color: Color) -> Self
Obtains the default pixel color when a module is dark or light.
Provided Methods§
sourcefn default_unit_size() -> (u32, u32)
fn default_unit_size() -> (u32, u32)
Obtains the default module size. The result must be at least 1×1.
Object Safety§
This trait is not object safe.