3. Appendix
3.1. Specifying object position
The coordinate origin of the label design is at bottom-left. The measurement unit, either inches or
millimeters, is set in the printer. The MeasurementUnit property in the LabelPrinter class allows setting
the measurement unit.
Example
// Polygon
int[] x = new int[] {50, 75, 100};
int[] y = new int[] {50, 125, 50};
design.drawPolygon(x, y);
// Rect
design.drawRect(50, 200, 50, 50, 1);
// Circle
design.drawCircle(250, 50, 30);
// Text
design.drawTextLocalFont("ABCxyz", Typeface.SERIF,
LabelConst.CLS_RT_NORMAL, 100, 100, 12,
LabelConst.CLS_FNT_DEFAULT, 250, 200);
// Line
design.drawLine(0, 200, 350, 200, 1); // Line-1
design.drawLine(50, 0, 50, 350, 1); // Line-2
design.drawLine(0, 50, 350, 50, 1); // Line-3
design.drawLine(250, 0, 250, 350, 1); // Line-4