Trait qrcode::render::Pixel
[−]
[src]
pub trait Pixel: Copy + Sized { type Image: Sized + 'static; type Canvas: Canvas<Pixel = Self, Image = Self::Image>; fn default_color(color: Color) -> Self; fn default_unit_size() -> (u32, u32) { ... } }
Abstraction of an image pixel.
Associated Types
type Image: Sized + 'static
Type of the finalized image.
type Canvas: Canvas<Pixel = Self, Image = Self::Image>
The type that stores an intermediate buffer before finalizing to a concrete image
Required Methods
fn default_color(color: Color) -> Self
Obtains the default pixel color when a module is dark or light.
Provided Methods
fn default_unit_size() -> (u32, u32)
Obtains the default module size. The result must be at least 1×1.