Geometry

Function pattern placement of the HanXin Barcode type class The matrix cells hold 1 for a dark module, 0 for a light one, the string 'I' for a module of a function information area and null for a modu

Namespace: Com\Tecnick\Barcode\Type\Square\HanXin

class Geometry

Source: src/Type/Square/HanXin/Geometry.php:38

Function pattern placement of the HanXin Barcode type class

The matrix cells hold 1 for a dark module, 0 for a light one, the string ‘I’ for a module of a function information area and null for a module of the encoding region.

Constants

INFO

Module of a function information area.

public const INFO = 'I'

Source: src/Type/Square/HanXin/Geometry.php:45

Methods

__construct()

Build the function patterns of the symbol.

public __construct(int $version)

Parameters:

  • $version (int): Symbol version, from 1 to 84.

Source: src/Type/Square/HanXin/Geometry.php:72

getEncodingCells()

Returns the modules of the encoding region, row by row and left to right, as pairs of row and column.

public getEncodingCells(): list<array{int, int}>

Returns: list<array{int, int}>

Source: src/Type/Square/HanXin/Geometry.php:110

getInfoCells()

Returns the modules of the four function information areas, each one counterclockwise, as pairs of row and column. The first and the third area take the first half of the function information, the second and the fourth take the second half.

public getInfoCells(): array{list<array{int, int}>, list<array{int, int}>, list<array{int, int}>, list<array{int, int}>}

Returns: array{list<array{int, int}>, list<array{int, int}>, list<array{int, int}>, list<array{int, int}>}

Source: src/Type/Square/HanXin/Geometry.php:134

getMatrix()

Returns the matrix of the function patterns.

public getMatrix(): array<int,array<int,int|string|null>>

Returns: array<int,array<int,int|string|null>>

Source: src/Type/Square/HanXin/Geometry.php:99

getSize()

Returns the symbol size in modules.

public getSize(): int

Returns: int

Source: src/Type/Square/HanXin/Geometry.php:89