WBITMAP-BARCODE-BOX
The WBITMAP-BARCODE-BOX function generates an image representing a barcode. Various barcode types are supported.
Syntax:
 CALL "W$BITMAP" USING WBITMAP-BARCODE-BOX
                       text
                       WBITMAP-BB-DATA
                      [errorDesc]
                GIVING bitmapHandle
Parameters:
WBITMAP-LOAD-SYMBOL-FONT-EX
Constant
 
text
PIC x(n)
Specifies the text associated with the barcode.
WBITMAP-BB-DATA
Group Item
Structure that hosts the information. This group item, defined in isgui.def, has the following structure:
 
01 wbitmap-bb-data.
   03 wbitmap-bb-width pic s9(9comp-4.
   03 wbitmap-bb-height pic s9(9comp-4.
   03 wbitmap-bb-type pic 9(2comp-4.
      88 wbitmap-codabar value 1.
      88 wbitmap-code128 value 2.
      88 wbitmap-code39 value 3.
      88 wbitmap-datamatrix value 4.
      88 wbitmap-royalmailcbc value 5.
      88 wbitmap-uspsintelligentmail value 6.
      88 wbitmap-postnet value 7.
      88 wbitmap-interleaved2of5 value 8.
      88 wbitmap-itf14 value 9.
      88 wbitmap-pdf417 value 10.
      88 wbitmap-ean128 value 11.
      88 wbitmap-ean13 value 12.
      88 wbitmap-ean8 value 13.
      88 wbitmap-upca value 14.
      88 wbitmap-upce value 15.
      88 wbitmap-qrcode value 16.
   03 wbitmap-bb-dpi pic 9(4comp-4 value 0.
   03 wbitmap-bb-orientation pic 9 value 0.
      88 wbitmap-or-horizontal value 0.
      88 wbitmap-or-vertical value 1.
   03 wbitmap-bb-antialiasing pic 9 value 0.
      88 wbitmap-aa-off value 0.
      88 wbitmap-aa-on value 1.
   03 wbitmap-bb-text-position pic 9 value 0.
      88 wbitmap-tp-none value 0.
      88 wbitmap-tp-bottom value 1.
      88 wbitmap-tp-top value 2.
   03 wbitmap-bb-custom-color pic 9.
      88 wbitmap-use-custom-color value 1, false zero.
   03 wbitmap-bb-fg-color pic s9(18comp-4.
   03 wbitmap-bb-bg-color pic s9(18comp-4.
   03 wbitmap-bb-logo-image pic s9(9comp-4.
 
wbitmap-bb-width
Specifies the barcode box width in pixels.
Be sure to specify a reasonable width to obtain a readable barcode.
This value might be altered by the routine to maintain the aspect ratio in the current barcode type.
 
wbitmap-bb-height
Specifies the barcode box height in pixels.
Be sure to specify a reasonable height to obtain a readable barcode.
This value might be altered by the routine to maintain the aspect ratio in the current barcode type.
 
wbitmap-bb-type
Specifies the barcode type.
 
wbitmap-bb-dpi
Specifies the image DPI.
When set to zero, the current DPI in the system is used.
 
wbitmap-bb-orientation
Specifies the image orientation.
 
 
wbitmap-bb-antialiasing
Enables or disables antialiasing.
 
wbitmap-bb-text-position
Specifies the text position for those barcode types where text can be shown. When set to zero, the text is not shown.
 
wbitmap-bb-use-custom-color
Specifies whether or not use a custom color for the barcode. By default, barcodes use a black foreground and a white background.
 
wbitmap-bb-fg-color
Specifies a custom foreground color for the barcode. See "Color management" for further details. Be sure to specify a reasonable color to obtain a readable barcode; brightest colors make the barcode more difficult to be read.
 
wbitmap-bb-bg-color
Specifies a custom background color for the barcode. See "Color management" for further details. Be sure to specify a reasonable color to obtain a readable barcode; low contrast between foreground and background makes the barcode more difficult to be read.
 
wbitmap-bb-logo-image
When set to a value different than zero, it specifies a custom logo image to be displayed in the center of the barcode. The value of this property is a bitmap handle obtained by calling the WBITMAP-LOAD function. The logo is applicable only to QR barcodes. No resizing is performed, so be sure to use reasonable logo dimensions to avoid covering important barcode data.
errorDesc
PIC X(n)
Optional parameter.
Receives the error description if the barcode generation fails.
Return code:
bitmapHandle must be declared as PIC S9(9) COMP-4 and provides additional information:
> 0
Receives the handle to the bitmap
0
An error occurred, the error description is stored in the errDesc parameter, if passed