struct Goban::MQR::Mask

Overview

Represents a mask pattern that can be applied to a canvas.

Defined in:

goban/mqr/mask.cr

Constant Summary

FORMAT_BITS = { {17477, 21934, 26515, 30328, 1758, 5941, 9480, 13539}, {16754, 20633, 25252, 29519, 1001, 4610, 8255, 12756}, {20011, 24512, 28157, 31766, 3248, 7515, 12134, 16013}, {19228, 23287, 26826, 31009, 2439, 6252, 10833, 15290} }
MASK_PATTERNS = {->(x : Int32, y : Int32) do (y & 1) == 0 end, ->(x : Int32, y : Int32) do (((x // 3) + (y // 2)) & 1) == 0 end, ->(x : Int32, y : Int32) do ((((x * y) & 1) + ((x * y) % 3)) & 1) == 0 end, ->(x : Int32, y : Int32) do ((((x + y) & 1) + ((x * y) % 3)) & 1) == 0 end}
MAX = 3_u8
MIN = 0_u8

Constructors

Instance methods inherited from struct Goban::AbstractQR::Mask

value : UInt8 value

Constructor Detail

def self.new(value) #