Expand description
The canvas module puts raw bits into the QR code canvas.
use qrcode_rs::types::{Version, EcLevel};
use qrcode_rs::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
Canvasis an intermediate helper structure to render error-corrected data into a QR code.
Enums§
- Mask
Pattern - 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.
- Module
- The color of a module (pixel) in the QR code.
Functions§
- is_
functional - Gets whether the module at the given coordinates represents a functional module.