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

Derived Implementations

impl Clone for MaskPattern
[src]

fn clone(&self) -> MaskPattern

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Copy for MaskPattern
[src]

impl Debug for MaskPattern
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.