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
CheckerboardQR code pattern 000: (x + y) % 2 == 0.
HorizontalLinesQR code pattern 001: y % 2 == 0.
VerticalLinesQR code pattern 010: x % 3 == 0.
DiagonalLinesQR code pattern 011: (x + y) % 3 == 0.
LargeCheckerboardQR code pattern 100: ((x/3) + (y/2)) % 2 == 0.
FieldsQR code pattern 101: (x*y)%2 + (x*y)%3 == 0.
DiamondsQR code pattern 110: ((x*y)%2 + (x*y)%3) % 2 == 0.
MeadowQR 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