static void setTextGraphicOrientation(int orientation)
Throws:
_INSERT_METHOD_SIGNATURE_HERE_
Description:
| Parameter | Range | Description |
|---|---|---|
| orientation | 0 ... 3 | screen orientation |
Sets the orientation of subsequent text and graphic drawing to one of the following modes:
| orientation | Description |
|---|---|
| ORIENTATION_LANDSCAPE | 0° |
| ORIENTATION_PORTRAIT | 90° |
| ORIENTATION_LANDSCAPE_UPSIDE_DOWN | 180° |
| ORIENTATION_PORTRAIT_UPSIDE_DOWN | 270° |
Note
Example
General.resetAll();
Control.setLineStyle(Attribute.LINE_DOTTED);
Control.setCursorPosition(50, 130);
Control.setTextAlignment(Control.TEXT_CENTER_HORIZONTALLY |
Control.TEXT_CENTER_VERTICALLY |
Control.TEXT_TURN_ALIGNMENT_ON,
65, 50);
Draw.drawRectangle(0, 65, 50);
Draw.writeText("Text Orientation = 0");
Control.setCursorPosition(150, 130);
Control.setTextGraphicOrientation(ORIENTATION_PORTRAIT);
Control.setTextAlignment(Control.TEXT_CENTER_HORIZONTALLY |
Control.TEXT_CENTER_VERTICALLY |
Control.TEXT_TURN_ALIGNMENT_ON,
65, 50);
Draw.writeText("Text Orientation = 1");
// Draw Rectangle is not affected by Text Orientation,
// thus the point of origin is different and width are swapped
Control.setCursorPosition(150, 66);
Draw.drawRectangle(0, 65, 50);

See also:
Control.setScreenOrientation(int)
Concept of Viewports
Control.setTextAlignment(int, int, int)
Control.setCursorPosition(int, int)
Draw.drawRectangle(int, int, int)
Copyright © demmel products gmbh. All rights reserved.