A_Prn_Text method
A_Prn_Text()
PURPOSE Create a "text" object.
SYNTAX int A_Prn_Text(int x, int y, int ori, int font, int type, int hor_factor, int ver_factor, char mode, int numeric, LPCTSTR data);
PARAMETER
x;
X coordinate.
y;
Y coordinate.
ori;
Orientation or print direction, 1:0�X�B2:90�X�B3:180�X�B4:270�X
font;
Font type as follows:
Note:Refer to the font tables in User's Manual.
type;
As follows:
+--------------+-----+---------------------------+
|font |type |Font Type |
+--------------+-----+---------------------------+
|0,1,2,3,4,5,6,|0 |font 0font 8 respectively.|
|7,8 | | |
+--------------+-----+---------------------------+
|9 |07 |ASD smooth fonts. |
| | |0:4points, 1:6points, |
| | |2:8points, 3:10points, |
| | |4:12points, 5:14points, |
| | |6:18points. |
+--------------+-----+---------------------------+
|9 |xxx |PCL soft font. |
| | |xxx : soft font ID with |
| | | 3 digits |
+--------------+-----+---------------------------+
|11 |0~7 |Courier fonts,(0 represents|
| | |symbol set) |
| | |0:Roman-8, 1:ECMA-94, |
| | |2:PC set, 3:PC set A, |
| | |4:PC set B, 5:Legal, |
| | |6:Greek, 7:Russian. |
+--------------+-----+---------------------------+
|12 |0 |Font selection form font |
| | |board. |
+--------------+-----+---------------------------+
hor_factor;
Horizontal scale factor. Value:1 ~ 24
ver_factor;
Vertical scale factor. Value:1 ~ 24
mode;
Add function as follows:
+----+-------------------------------------+
|mode| REMARK |
+----+-------------------------------------+
| A |Make auto increment for numeric. |
+----+-------------------------------------+
| B |Make auto increment for alphanumeric.|
+----+-------------------------------------+
| C |Make auto decrement for numeric. |
+----+-------------------------------------+
| D |Make auto decrement for alphanumeric.|
+----+-------------------------------------+
| M |Toggle the mirror mode. |
+----+-------------------------------------+
| N |Disable. |
+----+-------------------------------------+
numeric;
Automaticall increment or decrement the filed value. Value:0 ~ 99.
This field must exist When has add function.
data;
Data string.
RETURN 0 -> OK. Reference AW-Error.txt file.
EXAMPLE A_Prn_Text(310, 35, 1, 9, 0, 1, 1, 'N', 2, "PPLA COMMAND");
REMARK The A_Prn_Text function can print a line text.
Implementation
int A_Prn_Text(
int x,
int y,
int ori,
int font,
int type,
int hor_factor,
int ver_factor,
String mode,
int numeric,
String data,
) {
assert(hor_factor >= 1 && hor_factor <= 24,
'hor_factor must be between 1 and 24');
assert(ver_factor >= 1 && ver_factor <= 24,
'ver_factor must be between 1 and 24');
assert(['A', 'B', 'C', 'D', 'M', 'N'].contains(mode),
'Only allowed mode values: A, B, C, D, M, N.');
return _A_Prn_Text(
x,
y,
ori,
font,
type,
hor_factor,
ver_factor,
mode.codeUnitAt(0),
numeric,
data.toNativeUtf8().cast<ffi.Int8>(),
);
}