Module matrix_qrcode::qrcode::canvas
[−]Expand description
The canvas
module puts raw bits into the QR code canvas.
use qrcode::types::{Version, EcLevel};
use qrcode::canvas::{Canvas, MaskPattern};
let mut c = Canvas::new(Version::Normal(1), EcLevel::L);
c.draw_all_functional_patterns();
c.draw_data(b"data_here", b"ec_code_here");
c.apply_mask(MaskPattern::Checkerboard);
let bools = c.to_bools();
Structs
Canvas
is an intermediate helper structure to render error-corrected data
into a QR code.
Enums
The mask patterns. Since QR code and Micro QR code do not use the same pattern number, we name them according to their shape instead of the number.
The color of a module (pixel) in the QR code.
Functions
Gets whether the module at the given coordinates represents a functional module.