module QRCode::Utilities

Extended Modules

Defined in:

qr-code/utilities.cr

Constant Summary

BITS_FOR_MODE = {MODE[:mode_number] => [10, 12, 14], MODE[:mode_alpha_numk] => [9, 11, 13], MODE[:mode_8bit_byte] => [8, 16, 16]}
DEMERIT_POINTS_1 = 3
DEMERIT_POINTS_2 = 3
DEMERIT_POINTS_3 = 40
DEMERIT_POINTS_4 = 10
G15 = ((((((1 << 10) | (1 << 8)) | (1 << 5)) | (1 << 4)) | (1 << 2)) | (1 << 1)) | (1 << 0)
G15_MASK = ((((1 << 14) | (1 << 12)) | (1 << 10)) | (1 << 4)) | (1 << 1)
G18 = (((((((1 << 12) | (1 << 11)) | (1 << 10)) | (1 << 9)) | (1 << 8)) | (1 << 5)) | (1 << 2)) | (1 << 0)
PATTERN_POSITION_TABLE = [[] of Int32, [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]]

Instance Method Summary

Instance Method Detail

def demerit_points_1_same_color(modules) #

[View source]
def demerit_points_2_full_blocks(modules) #

[View source]
def demerit_points_3_dangerous_patterns(modules) #

ameba:disable Metrics/CyclomaticComplexity


[View source]
def demerit_points_4_dark_ratio(modules) #

[View source]
def get_bch_digit(data) #

[View source]
def get_bch_format_info(data) #

[View source]
def get_bch_version(data) #

[View source]
def get_error_correct_polynomial(error_correct_length) #

[View source]
def get_length_in_bits(mode, version) #

[View source]
def get_lost_points(modules) #

[View source]
def get_mask(mask_pattern, i, j) #

[View source]
def get_pattern_positions(version) #

[View source]
def max_size #

[View source]
def rszf(num : Int32, count : Int32) #

[View source]
def rszf(num : UInt8, count : Int32) #

[View source]