- label & print
Use font to label in the draw zone.
| Primitive | Alt | Action |
|---|---|---|
|
Label "
abcd
Set FontName n Set FontSize s Set FontJustify [h v] |
SetFN SetFS |
Turtle
labels
'abcd' at current position and heading
. *
Set font name to number n. Set font size to s pixels. Set font justification. (h and v can be 0, 1 or 2). |
| LabelLength " abcd | Return length of label "abcd, (pixels). |
Use text to print in the text zone.
| Primitive | Alt | Action |
|---|---|---|
|
Print "
abcd
Write " abcd Set TextSize s Set TextName n Set TextColor c Set Style [ list ] |
Pr
SetTS SetTN SetTC SetSty |
Print
'abcd' in text window on new line.
Write 'abcd' in text window on same line. Set text size to s pixels. Set text name to number n. Set text color to c. (See Colors ) Set text to style (s) defined in list. |
| ClearText | CT | Clear the text area. |
Underlined
Set
can be removed from a primitive name in order to return information.
eg.
SetHeading
sets the heading of the turtle.
Heading
returns the heading of the turtle.
* turtle position and heading remain unchanged.
SetFontJustify [h v]
[2 0] [1 0] [0 0]
[2 1] [1 1] [0 1]
[2 2] [1 2] [0 2]
So for instance use [1 1] for text horizontally and vertically centred on the turtles position.
See perspective for label text in 3d.
Note