Enum qrcode::canvas::MaskPattern [−][src]
pub enum MaskPattern { Checkerboard, HorizontalLines, VerticalLines, DiagonalLines, LargeCheckerboard, Fields, Diamonds, Meadow, }
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.
Variants
Checkerboard
QR code pattern 000: (x + y) % 2 == 0
.
HorizontalLines
QR code pattern 001: y % 2 == 0
.
VerticalLines
QR code pattern 010: x % 3 == 0
.
DiagonalLines
QR code pattern 011: (x + y) % 3 == 0
.
LargeCheckerboard
QR code pattern 100: ((x/3) + (y/2)) % 2 == 0
.
Fields
QR code pattern 101: (x*y)%2 + (x*y)%3 == 0
.
Diamonds
QR code pattern 110: ((x*y)%2 + (x*y)%3) % 2 == 0
.
Meadow
QR code pattern 111: ((x+y)%2 + (x*y)%3) % 2 == 0
.
Trait Implementations
impl Debug for MaskPattern
[src]
impl Debug for MaskPattern
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Copy for MaskPattern
[src]
impl Copy for MaskPattern
impl Clone for MaskPattern
[src]
impl Clone for MaskPattern
fn clone(&self) -> MaskPattern
[src]
fn clone(&self) -> MaskPattern
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl Send for MaskPattern
impl Send for MaskPattern
impl Sync for MaskPattern
impl Sync for MaskPattern