classes-Com-Tecnick-Barcode-Type-Square-QrCode-Mask

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.

Mask extends MaskNum

Com\Tecnick\Barcode\Type\Square\QrCode\Mask

Tags
since
2015-02-21
category

Library

author

Nicola Asuni info@tecnick.com

copyright

2010-2016 Nicola Asuni - Tecnick.com LTD

license

http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)

link
https://github.com/tecnickcom/tc-lib-barcode

Table of Contents

$version  : int
QR code version.
$level  : int
Error correction level
$qr_default_mask  : int
Default mask used when $this->qr_find_best_mask === false
$qr_find_best_mask  : bool
If true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code
$qr_find_from_random  : int
If false, checks all masks available, otherwise the value indicates the number of masks to be checked, mask id are random
$runLength  : array<string|int, mixed>
Run length
$spc  : Spec
Spec class object
__construct()  : mixed
Initialize
calcN1N3()  : int
Calc N1 N3
calcN1N3delta()  : int
Calc N1 N3 delta
evaluateSymbol()  : int
Evaluate Symbol
evaluateSymbolB()  : int
Evaluate Symbol
generateMaskNo()  : array<string|int, mixed>
Return bit mask
makeMask()  : array<string|int, mixed>
Make a mask
makeMaskNo()  : int
Make Mask Number
mask()  : array<string|int, mixed>
Get the best mask
mask0()  : int
Mask 0
mask1()  : int
Mask 1
mask2()  : int
Mask 2
mask3()  : int
Mask 3
mask4()  : int
Mask 4
mask5()  : int
Mask 5
mask6()  : int
Mask 6
mask7()  : int
Mask 7
writeFormatInformation()  : int
Write Format Information on the frame and returns the number of black bits

Properties

$version

QR code version.

public int $version = 0

The Size of QRcode is defined as version. Version is an integer value from 1 to 40. Version 1 is 2121 matrix. And 4 modules increases whenever 1 version increases. So version 40 is 177177 matrix.

$level

Error correction level

protected int $level = 0

$qr_default_mask

Default mask used when $this->qr_find_best_mask === false

protected int $qr_default_mask = 2

$qr_find_best_mask

If true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code

protected bool $qr_find_best_mask = true

$qr_find_from_random

If false, checks all masks available, otherwise the value indicates the number of masks to be checked, mask id are random

protected int $qr_find_from_random = false

$runLength

Run length

protected array<string|int, mixed> $runLength = array()

Methods

__construct()

Initialize

public __construct(int $version, int $level[, bool $random_mask = false ][, bool $best_mask = true ][, int $default_mask = 2 ]) : mixed
Parameters
$version : int

Code version

$level : int

Error Correction Level

$random_mask : bool = false

If false, checks all masks available, otherwise the value indicates the number of masks to be checked, mask id are random

$best_mask : bool = true

If true, estimates best mask (slow)

$default_mask : int = 2

Default mask used when $fbm is false

Return values
mixed

calcN1N3()

Calc N1 N3

protected calcN1N3(int $length) : int
Parameters
$length : int
Return values
int

demerit

calcN1N3delta()

Calc N1 N3 delta

protected calcN1N3delta(int $length, int $idx) : int
Parameters
$length : int
$idx : int
Return values
int

demerit delta

evaluateSymbol()

Evaluate Symbol

protected evaluateSymbol(int $width, array<string|int, mixed> $frame) : int
Parameters
$width : int

Width

$frame : array<string|int, mixed>

Frame

Return values
int

demerit

evaluateSymbolB()

Evaluate Symbol

protected evaluateSymbolB(int $ypos, int $width, array<string|int, mixed> $frameY, array<string|int, mixed> $frameYM) : int
Parameters
$ypos : int

Y position

$width : int

Width

$frameY : array<string|int, mixed>
$frameYM : array<string|int, mixed>
Return values
int

demerit

generateMaskNo()

Return bit mask

protected generateMaskNo(int $maskNo, int $width, array<string|int, mixed> $frame) : array<string|int, mixed>
Parameters
$maskNo : int

Mask number

$width : int

Width

$frame : array<string|int, mixed>

Frame

Return values
array<string|int, mixed>

bit mask

makeMask()

Make a mask

protected makeMask(int $width, array<string|int, mixed> $frame, int $maskNo, int $level) : array<string|int, mixed>
Parameters
$width : int

Mask width

$frame : array<string|int, mixed>

Frame

$maskNo : int

Mask number

$level : int

Error Correction level

Return values
array<string|int, mixed>

mask

makeMaskNo()

Make Mask Number

protected makeMaskNo(int $maskNo, int $width, int $frame, int &$mask) : int
Parameters
$maskNo : int

Mask number

$width : int

Width

$frame : int

Frame

$mask : int

Mask

Return values
int

mask number

mask()

Get the best mask

protected mask(int $width, array<string|int, mixed> $frame, int $level) : array<string|int, mixed>
Parameters
$width : int

Width

$frame : array<string|int, mixed>

Frame

$level : int

Error Correction lLevel

Return values
array<string|int, mixed>

best mask

mask0()

Mask 0

protected mask0(int $xpos, int $ypos) : int
Parameters
$xpos : int

X position

$ypos : int

Y position

Return values
int

mask

mask1()

Mask 1

protected mask1(int $xpos, int $ypos) : int
Parameters
$xpos : int

X position

$ypos : int

Y position

Return values
int

mask

mask2()

Mask 2

protected mask2(int $xpos, int $ypos) : int
Parameters
$xpos : int

X position

$ypos : int

Y position

Return values
int

mask

mask3()

Mask 3

protected mask3(int $xpos, int $ypos) : int
Parameters
$xpos : int

X position

$ypos : int

Y position

Return values
int

mask

mask4()

Mask 4

protected mask4(int $xpos, int $ypos) : int
Parameters
$xpos : int

X position

$ypos : int

Y position

Return values
int

mask

mask5()

Mask 5

protected mask5(int $xpos, int $ypos) : int
Parameters
$xpos : int

X position

$ypos : int

Y position

Return values
int

mask

mask6()

Mask 6

protected mask6(int $xpos, int $ypos) : int
Parameters
$xpos : int

X position

$ypos : int

Y position

Return values
int

mask

mask7()

Mask 7

protected mask7(int $xpos, int $ypos) : int
Parameters
$xpos : int

X position

$ypos : int

Y position

Return values
int

mask

writeFormatInformation()

Write Format Information on the frame and returns the number of black bits

protected writeFormatInformation(int $width, array<string|int, mixed> &$frame, int $maskNo, int $level) : int
Parameters
$width : int

Mask width

$frame : array<string|int, mixed>

Frame

$maskNo : int

Mask number

$level : int

Error Correction level

Return values
int

blacks

 

© 2004-2021 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy