Home  Contents

2of5 interleaved

Graphics Core4 Lua Commands

SYNOPSIS

  1. width, height = gcx:barcode("code25i", x, y, module_width, barcode_height, text)
  2. width, height = gcx:barcodesize("code25i", x, y, module_width, barcode_height, text)
  3. width, height = gfx.barcodesize("code25i", x, y, module_width, barcode_height, text)

DESCRIPTION

Draws a Interleaved Two-of-Five barcode at the coordinates x, y.

This is a numeric barcode. The barcode always encodes an even number of digits. When passing an odd number of digits with the text parameter, an additional check-digit is calculated and added automatically.

The parameter module_width specifies the width of one Module unit. If the barcode is to be printed, the parameter should be at least 2, better 3.

The parameter barcode_height specifies the height of the full barcode in pixels.

RETURN VALUE

On success, returns the width and height of the resulting barcode in pixels. If the barcode cannot be drawn due to invalid parameters, returns nil, nil.