Manual - Barcode 2D
Introduction
This class is an abstract class that contains the base methods to create 2D barcodes only.
This class inherits the BakeryBarcode class.
Methods
BakeryBarcode2D's Methods
-
scaleX={
scaleX } — Sets the scaling X for the barcode -
scaleY={
scaleY } — Sets the scaling Y for the barcode
BakeryBarcode's Methods
-
text={
text } — Analyzes atext message to draw afterwards -
scale={
scale } — Sets the scale of the barcode -
foregroundColor={
color } — Sets the color of the bars -
backgroundColor={
color } — Sets the color of the spaces -
offsetX={
value } — Sets the X offset -
offsetY={
value } — Sets the Y offset
Code Example
// To get an example on how to use this class, check barcode classes.
Method explanations
-
scaleX={
scaleX } — Sets the scaling X for the barcodeDescriptionThe width in pixel of one module.
The default value is 1.
Note that this method is protected. -
scaleY={
scaleY } — Sets the scaling Y for the barcodeDescriptionThe height in pixel of one module.
The default value is 1.
Note that this method is protected.
-
text={
text } — Analyzes atext message to draw afterwardsDescriptionThe data you pass to thetext argument must be supported by the type of barcode you use.
Check each barcode's introduction section to obtain more information on how to use this method within each symbology. -
scale={
scale } — Sets the scale of the barcodeDescriptionThe barcode will bex times bigger. Then a pixel will bex byx for its size. -
foregroundColor={
color } — Sets the color of the barsDescriptionSets the color of the bars of the barcode. By default, the color is black. This argument can be aBakeryColor class or any other argument thatBakeryColor can accept in its constructor. -
backgroundColor={
color } — Sets the color of the spacesDescriptionSets the color of the spaces of the barcode. By default, the color is white. This argument can be aBakeryColor class or any other argument thatBakeryColor can accept in its constructor. -
offsetX={
value } — Sets the X offsetDescriptionSpecifies the X offset of the barcode in pixels multiplied by the scale. -
offsetY={
value } — Sets the Y offsetDescriptionSpecifies the Y offset of the barcode in pixels multiplied by the scale.