Modes extends Placement
Com\Tecnick\Barcode\Type\Square\Datamatrix\Modes
Modes for Datamatrix Barcode type class
Tags
Table of Contents
- get253StateCodeword() : pad
- Return the 253-state codeword
- getPlacementMap() : array<string|int, mixed>
- Build a placement map.
- get255StateCodeword() : int
- Return the 255-state codeword
- getMaxDataCodewords() : number
- Choose the minimum matrix size and return the max number of data codewords.
- getSwitchEncodingCodeword() : (int)
- Get the switching codeword to a new encoding mode (latch codeword)
- isASCIIEXTMode() : bool
- Tell if char is ASCII character 128 to 255
- isASCIINUMMode() : bool
- Tell if char is ASCII digits
- isBASE256Mode() : bool
- Tell if char is Function character (FNC1, Structured Append, Reader Program, or Code Page)
- isC40Mode() : bool
- Tell if char is Upper-case alphanumeric
- isCharMode() : bool
- Returns true if the char belongs to the selected mode
- isEDFMode() : bool
- Tell if char is ASCII character 32 to 94
- isTXTMode() : bool
- Tell if char is Lower-case alphanumeric
- isX12Mode() : bool
- Tell if char is ANSI X12
- placeCornerA() : array<string|int, mixed>
- Places the 8 bits of the first special corner case.
- placeCornerB() : array<string|int, mixed>
- Places the 8 bits of the second special corner case.
- placeCornerC() : array<string|int, mixed>
- Places the 8 bits of the third special corner case.
- placeCornerD() : array<string|int, mixed>
- Places the 8 bits of the fourth special corner case.
- placeModule() : array<string|int, mixed>
- Places "chr+bit" with appropriate wrapping within array[].
- placeSweepDownward() : array<string|int, mixed>
- Sweep downward diagonally, inserting successive characters, (Annex F - ECC 200 symbol character placement)
- placeSweepUpward() : array<string|int, mixed>
- Sweep upward diagonally, inserting successive characters, (Annex F - ECC 200 symbol character placement)
- placeUtah() : array<string|int, mixed>
- Places the 8 bits of a utah-shaped symbol character.
Methods
get253StateCodeword()
Return the 253-state codeword
public get253StateCodeword(int $cdwpad,
int $cdwpos)
: pad
Parameters
- $cdwpad : int
-
Pad codeword.
- $cdwpos : int
-
Number of data codewords from the beginning of encoded data.
Return values
pad —codeword
getPlacementMap()
Build a placement map.
public getPlacementMap(int $nrow,
int $ncol)
: array<string|int,
mixed>
(Annex F - ECC 200 symbol character placement)
Parameters
- $nrow : int
-
Number of rows.
- $ncol : int
-
Number of columns.
Return values
array<string|int, mixed> —get255StateCodeword()
Return the 255-state codeword
protected get255StateCodeword(int $cdwpad,
int $cdwpos)
: int
Parameters
- $cdwpad : int
-
Pad codeword.
- $cdwpos : int
-
Number of data codewords from the beginning of encoded data.
Return values
int —pad codeword
getMaxDataCodewords()
Choose the minimum matrix size and return the max number of data codewords.
protected getMaxDataCodewords(int $numcw)
: number
Parameters
- $numcw : int
-
Number of current codewords.
Return values
number —of data codewords in matrix
getSwitchEncodingCodeword()
Get the switching codeword to a new encoding mode (latch codeword)
protected getSwitchEncodingCodeword( $mode)
: (int)
Parameters
Tags
Return values
(int) —Switch codeword.
isASCIIEXTMode()
Tell if char is ASCII character 128 to 255
protected isASCIIEXTMode(int $chr)
: bool
Parameters
- $chr : int
-
Character (byte) to check.
Return values
bool —isASCIINUMMode()
Tell if char is ASCII digits
protected isASCIINUMMode(int $chr)
: bool
Parameters
- $chr : int
-
Character (byte) to check.
Return values
bool —isBASE256Mode()
Tell if char is Function character (FNC1, Structured Append, Reader Program, or Code Page)
protected isBASE256Mode(int $chr)
: bool
Parameters
- $chr : int
-
Character (byte) to check.
Return values
bool —isC40Mode()
Tell if char is Upper-case alphanumeric
protected isC40Mode(int $chr)
: bool
Parameters
- $chr : int
-
Character (byte) to check.
Return values
bool —isCharMode()
Returns true if the char belongs to the selected mode
protected isCharMode(int $chr,
int $mode)
: bool
Parameters
- $chr : int
-
Character (byte) to check.
- $mode : int
-
Current encoding mode.
Return values
bool —true if the char is of the selected mode.
isEDFMode()
Tell if char is ASCII character 32 to 94
protected isEDFMode(int $chr)
: bool
Parameters
- $chr : int
-
Character (byte) to check.
Return values
bool —isTXTMode()
Tell if char is Lower-case alphanumeric
protected isTXTMode(int $chr)
: bool
Parameters
- $chr : int
-
Character (byte) to check.
Return values
bool —isX12Mode()
Tell if char is ANSI X12
protected isX12Mode(int $chr)
: bool
Parameters
- $chr : int
-
Character (byte) to check.
Return values
bool —placeCornerA()
Places the 8 bits of the first special corner case.
protected placeCornerA(array<string|int,
mixed> $marr,
int $nrow,
int $ncol,
int &$chr,
int $row,
int $col)
: array<string|int,
mixed>
(Annex F - ECC 200 symbol character placement)
Parameters
- $marr : array<string|int, mixed>
-
Array of symbols
- $nrow : int
-
Number of rows
- $ncol : int
-
Number of columns
- $chr : int
-
Char byte
- $row : int
-
Current row
- $col : int
-
Current column
Return values
array<string|int, mixed> —placeCornerB()
Places the 8 bits of the second special corner case.
protected placeCornerB(array<string|int,
mixed> $marr,
int $nrow,
int $ncol,
int &$chr,
int $row,
int $col)
: array<string|int,
mixed>
(Annex F - ECC 200 symbol character placement)
Parameters
- $marr : array<string|int, mixed>
-
Array of symbols
- $nrow : int
-
Number of rows
- $ncol : int
-
Number of columns
- $chr : int
-
Char byte
- $row : int
-
Current row
- $col : int
-
Current column
Return values
array<string|int, mixed> —placeCornerC()
Places the 8 bits of the third special corner case.
protected placeCornerC(array<string|int,
mixed> $marr,
int $nrow,
int $ncol,
int &$chr,
int $row,
int $col)
: array<string|int,
mixed>
(Annex F - ECC 200 symbol character placement)
Parameters
- $marr : array<string|int, mixed>
-
Array of symbols
- $nrow : int
-
Number of rows
- $ncol : int
-
Number of columns
- $chr : int
-
Char byte
- $row : int
-
Current row
- $col : int
-
Current column
Return values
array<string|int, mixed> —placeCornerD()
Places the 8 bits of the fourth special corner case.
protected placeCornerD(array<string|int,
mixed> $marr,
int $nrow,
int $ncol,
int &$chr,
int $row,
int $col)
: array<string|int,
mixed>
(Annex F - ECC 200 symbol character placement)
Parameters
- $marr : array<string|int, mixed>
-
Array of symbols
- $nrow : int
-
Number of rows
- $ncol : int
-
Number of columns
- $chr : int
-
Char byte
- $row : int
-
Current row
- $col : int
-
Current column
Return values
array<string|int, mixed> —placeModule()
Places "chr+bit" with appropriate wrapping within array[].
protected placeModule(array<string|int,
mixed> $marr,
int $nrow,
int $ncol,
int $row,
int $col,
int $chr,
int $bit)
: array<string|int,
mixed>
(Annex F - ECC 200 symbol character placement)
Parameters
- $marr : array<string|int, mixed>
-
Array of symbols.
- $nrow : int
-
Number of rows.
- $ncol : int
-
Number of columns.
- $row : int
-
Row number.
- $col : int
-
Column number.
- $chr : int
-
Char byte.
- $bit : int
-
Bit.
Return values
array<string|int, mixed> —placeSweepDownward()
Sweep downward diagonally, inserting successive characters, (Annex F - ECC 200 symbol character placement)
protected placeSweepDownward(array<string|int,
mixed> $marr,
int $nrow,
int $ncol,
int &$chr,
int &$row,
int &$col)
: array<string|int,
mixed>
Parameters
- $marr : array<string|int, mixed>
-
Array of symbols
- $nrow : int
-
Number of rows
- $ncol : int
-
Number of columns
- $chr : int
-
Char byte
- $row : int
-
Current row
- $col : int
-
Current column
Return values
array<string|int, mixed> —placeSweepUpward()
Sweep upward diagonally, inserting successive characters, (Annex F - ECC 200 symbol character placement)
protected placeSweepUpward(array<string|int,
mixed> $marr,
int $nrow,
int $ncol,
int &$chr,
int &$row,
int &$col)
: array<string|int,
mixed>
Parameters
- $marr : array<string|int, mixed>
-
Array of symbols
- $nrow : int
-
Number of rows
- $ncol : int
-
Number of columns
- $chr : int
-
Char byte
- $row : int
-
Current row
- $col : int
-
Current column
Return values
array<string|int, mixed> —placeUtah()
Places the 8 bits of a utah-shaped symbol character.
protected placeUtah(array<string|int,
mixed> $marr,
int $nrow,
int $ncol,
int $row,
int $col,
int $chr)
: array<string|int,
mixed>
(Annex F - ECC 200 symbol character placement)
Parameters
- $marr : array<string|int, mixed>
-
Array of symbols.
- $nrow : int
-
Number of rows.
- $ncol : int
-
Number of columns.
- $row : int
-
Row number.
- $col : int
-
Column number.
- $chr : int
-
Char byte.