Text
Constructor
Text <id> (double x, double y, string text)
or
Text <id> (double x, double y, dx, double dy, int dxu, int dyu, string encoding, string text)
Action
Draws a text.Predefined children
- TextProperty:
text, encoding
. - DoubleProperty:
x, y, dx, dy, width, height, rx, ry
. - IntProperty:
dxU, dyU
.
TextAnchor
Constructor
TextAnchor <id> (int anchor)
anchor
- 0 - start
- 1 - middle
- 2 - end
Action
Specifies the anchor when setting the position of the text.Predefined children
- IntProperty:
anchor
.
Example
use core
use display
use gui
_main_
Component root {
Frame f ("myFrame", 0, 0, 400, 400)
Rectangle button (50, 200, 100, 100, 5, 5)
TextAnchor _ (1)
FillColor _ (0, 0, 0)
Text t (100, 250, "MyButton")
}