DrawDataMatrixSymbolA
Vector graphics, Barcodes
Description
The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to DrawDataMatrixSymbol and string arguments are interpreted using the current SetAnsiMode code page
This function draws a Data Matrix symbol onto the page. Data Matrix is a 2D barcode symbology allowing large amounts of data to be stored
Syntax
Delphi
Function DLDrawDataMatrixSymbolA(InstanceID: Integer; Left, Top, ModuleSize: Double; Text: PAnsiChar; Encoding, SymbolSize, Options: Integer): Integer;
DLL
int DLDrawDataMatrixSymbolA(int InstanceID, double Left, double Top, double ModuleSize, const char* Text, int Encoding, int SymbolSize, int Options);
Parameters
| Left | The horizontal co-ordinate of the left edge of the symbol |
|---|---|
| Top | The vertical co-ordinate of the top edge of the symbol |
| ModuleSize | This value is used for the width and height of the dots which make up the symbol |
| Text | The text/data to store in the symbol |
| Encoding | 1 = ASCII encoding (with automatic C40 optimization) 2 = C40 encoding (Basic Set plus Shift 1/2/3 and Upper Shift) 3 = Base 256 binary encoding (255-state randomized byte stream) 4 = Text encoding (lowercase Basic Set plus Shift 1/2/3 and Upper Shift) 5 = ANSI X12 EDI encoding (codeword 238 latch, 3 characters per 2 codewords) 6 = EDIFACT encoding (codeword 240 latch, 4 6-bit characters per 3 codewords with unlatch 31) 7 = GS1 DataMatrix (FNC1 codeword 232 in first position); separate element strings with [FNC1] or #29, or write them in human readable form such as (01)09501101530003(17)261231(10)ABC123, where a separator is inserted automatically after each variable-length AI that is followed by another AI, predefined-length AIs (AIs starting with 00 to 04, 11 to 20, 31 to 36 or 41, for example 01, 17, 3103 and 410) must have their exact length, and data values cannot contain parentheses (use the [FNC1] form for those) |
| SymbolSize | 0 = Auto size 1 = 10x10 2 = 12x12 3 = 8x18 4 = 14x14 5 = 8x32 6 = 16x16 7 = 12x26 8 = 18x18 9 = 20x20 10 = 12x36 11 = 22x22 12 = 16x36 13 = 24x24 14 = 26x26 15 = 16x48 16 = 32x32 17 = 36x36 18 = 40x40 19 = 44x44 20 = 48x48 21 = 52x52 22 = 64x64 23 = 72x72 24 = 80x80 25 = 88x88 26 = 96x96 27 = 104x104 28 = 120x120 29 = 132x132 30 = 144x144 |
| Options | 0 = Normal 1 = Rotate 90 degrees counter clockwise 2 = Rotate 180 degrees 3 = Rotate 90 degrees clockwise; add 100 for 1 unit quiet zone (default), 200 for 2 units, 300 for 3 units, or 400 for 4 units (up to 900 for 9 units); values without a hundreds digit also use the default 1 unit quiet zone. The default quiet zone lies inside the area that starts at Left and Top, and each additional unit extends the white border outward on all four sides |
Return values
| 0 | The Encoding, SymbolSize or Options parameter was invalid, the encoded data does not fit the selected symbol size (or the largest 144x144 symbol when SymbolSize is 0), or a GS1 element string in (AI) form is malformed (unbalanced parentheses, an AI that is not 2 to 4 digits, an empty data value, or a predefined-length AI of the wrong length); for the data errors nothing is drawn and LastErrorCode returns 302 |
|---|---|
| 1 | The Data Matrix symbol was drawn successfully |