Com\Tecnick\Barcode\Type\Convert
Barcode Convert class
Tags
Table of Contents
- getGridArray() : array<string|int, mixed>
- Get a raw barcode grid array
- convertDecToHex() : string
- Convert large integer number to hexadecimal representation.
- convertHexToDec() : string
- Convert large hexadecimal number to decimal representation (string).
- getBarRectXYWH() : array<string|int, mixed>
- Get the adjusted rectangular coordinates (x,y,w,h) for the specified bar
- getBarRectXYXY() : array<string|int, mixed>
- Get the adjusted rectangular coordinates (x1,y1,x2,y2) for the specified bar
- getRotatedBarArray() : array<string|int, mixed>
- Returns the bars array ordered by columns
- processBinarySequence() : mixed
- Import a binary sequence of comma-separated 01 strings
Methods
getGridArray()
Get a raw barcode grid array
public getGridArray([string $space_char
= '0'
][,
string $bar_char
= '1'
]) : array<string|int,
mixed>
Parameters
- $space_char : string = '0'
-
Character or string to use for filling empty spaces
- $bar_char : string = '1'
-
Character or string to use for filling bars
Return values
array<string|int, mixed> —convertDecToHex()
Convert large integer number to hexadecimal representation.
protected convertDecToHex(string $number)
: string
Parameters
- $number : string
-
Number to convert (as string)
Return values
string —hexadecimal representation
convertHexToDec()
Convert large hexadecimal number to decimal representation (string).
protected convertHexToDec(string $hex)
: string
Parameters
- $hex : string
-
Hexadecimal number to convert (as string)
Return values
string —hexadecimal representation
getBarRectXYWH()
Get the adjusted rectangular coordinates (x,y,w,h) for the specified bar
protected getBarRectXYWH(mixed $bar)
: array<string|int,
mixed>
Parameters
- $bar : mixed
Return values
array<string|int, mixed> —Bar coordinates
getBarRectXYXY()
Get the adjusted rectangular coordinates (x1,y1,x2,y2) for the specified bar
protected getBarRectXYXY(mixed $bar)
: array<string|int,
mixed>
Parameters
- $bar : mixed
Return values
array<string|int, mixed> —Bar coordinates
getRotatedBarArray()
Returns the bars array ordered by columns
protected getRotatedBarArray()
: array<string|int,
mixed>
Return values
array<string|int, mixed> —processBinarySequence()
Import a binary sequence of comma-separated 01 strings
protected processBinarySequence(string $code)
: mixed
Parameters
- $code : string
-
Code to process