Struct qrcode::canvas::Canvas[][src]

pub struct Canvas { /* fields omitted */ }

Canvas is an intermediate helper structure to render error-corrected data into a QR code.

Methods

impl Canvas
[src]

Constructs a new canvas big enough for a QR code of the given version.

Obtains a module at the given coordinates. For convenience, negative coordinates will wrap around.

Obtains a mutable module at the given coordinates. For convenience, negative coordinates will wrap around.

Sets the color of a functional module at the given coordinates. For convenience, negative coordinates will wrap around.

impl Canvas
[src]

Draw all functional patterns, before data placement.

All functional patterns (e.g. the finder pattern) except the format info pattern will be filled in. The format info pattern will be filled with light modules instead. Data bits can then put in the empty modules. with .draw_data().

impl Canvas
[src]

Draws the encoded data and error correction codes to the empty modules.

impl Canvas
[src]

Applies a mask to the canvas. This method will also draw the format info patterns.

impl Canvas
[src]

Construct a new canvas and apply the best masking that gives the lowest penalty score.

Deprecated since 0.4.0

: use into_colors() instead

Convert the modules into a vector of booleans.

Convert the modules into a vector of colors.

Trait Implementations

impl Clone for Canvas
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Canvas

impl Sync for Canvas