|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| __construct ($code, $type) | |
| getBarcodeArray () | |
| getBarcodeSVG ($w=3, $h=3, $color='black') | |
| getBarcodeSVGcode ($w=3, $h=3, $color='black') | |
| getBarcodeHTML ($w=10, $h=10, $color='black') | |
| getBarcodePNG ($w=3, $h=3, $color=array(0, 0, 0)) | |
| setBarcode ($code, $type) | |
Protected Attributes | |
| $barcode_array = false | |
PHP class to creates array representations for 2D barcodes to be used with TCPDF (http://www.tcpdf.org).
Definition at line 50 of file 2dbarcodes.php.
| __construct | ( | $ | code, |
| $ | type | ||
| ) |
This is the class constructor. Return an array representations for 2D barcodes:
| $code | (string) code to print |
| $type | (string) type of barcode:
|
Definition at line 68 of file 2dbarcodes.php.

| getBarcodeArray | ( | ) |
Return an array representations of barcode.
Definition at line 76 of file 2dbarcodes.php.
| getBarcodeHTML | ( | $ | w = 10, |
| $ | h = 10, |
||
| $ | color = 'black' |
||
| ) |
Return an HTML representation of barcode.
| $w | (int) Width of a single rectangle element in pixels. |
| $h | (int) Height of a single rectangle element in pixels. |
| $color | (string) Foreground color for bar elements (background is transparent). |
Definition at line 144 of file 2dbarcodes.php.
| getBarcodePNG | ( | $ | w = 3, |
| $ | h = 3, |
||
| $ | color = array(0,0,0) |
||
| ) |
Return a PNG image representation of barcode (requires GD or Imagick library).
| $w | (int) Width of a single rectangle element in pixels. |
| $h | (int) Height of a single rectangle element in pixels. |
| $color | (array) RGB (0-255) foreground color for bar elements (background is transparent). |
Definition at line 174 of file 2dbarcodes.php.
| getBarcodeSVG | ( | $ | w = 3, |
| $ | h = 3, |
||
| $ | color = 'black' |
||
| ) |
Send barcode as SVG image object to the standard output.
| $w | (int) Width of a single rectangle element in user units. |
| $h | (int) Height of a single rectangle element in user units. |
| $color | (string) Foreground color (in SVG format) for bar elements (background is transparent). |
Definition at line 87 of file 2dbarcodes.php.

| getBarcodeSVGcode | ( | $ | w = 3, |
| $ | h = 3, |
||
| $ | color = 'black' |
||
| ) |
Return a SVG string representation of barcode.
| $w | (int) Width of a single rectangle element in user units. |
| $h | (int) Height of a single rectangle element in user units. |
| $color | (string) Foreground color (in SVG format) for bar elements (background is transparent). |
Definition at line 108 of file 2dbarcodes.php.

| setBarcode | ( | $ | code, |
| $ | type | ||
| ) |
Set the barcode.
| $code | (string) code to print |
| $type | (string) type of barcode:
|
Definition at line 236 of file 2dbarcodes.php.

$barcode_array = false [protected] |
Array representation of barcode.
Definition at line 56 of file 2dbarcodes.php.