Name
tx2 — 2D text
Syntax
tx2 [textsize] [lle | lri | ule | uri | cur | ref | min | coor] [screen] [nob] [poi] [col] [fol] [use] [let] [txt] text
Description
Display a 2D text on the screen. This text is unaffected by rotation, pan and zoom, but will be affetced by window resizing.
Arguments
textsize
Will display the text using text size relative to 1.
lle | lri | ule | uri txt text
Will display text in lower left | lower right | upper left | upper right corner of the screen.
cur | ref | min txt text
Will display text at cursor position | reference point | lower left of grid window. The reference point is set by the ref command.
let text
Display the text as individual letters at the points of the active datasets.
nob
No bold numbers.
nsh
No shadow on numbers.
ita
Italic numbers.
fam 1 | 2 | ... | 9
Use font family 1 / 2 / 3 /.../9
coor xcoor ycoor | xcoor ycoor zcoor
Position in world coordinates xcoor ycoor for fixed x y placement (not using the fol argument) or xcoor ycoor zcoor for using the fol argument.
screen xpix ypix
Position from lower left corner in pixel positions xpix ypix.
col whi | red | gre | ...
Select color for display.
col r g b
Select color for display using r g b values.
use
Use the current color.
fol
Use the follower for the text to follow the camera. In that case the command must know the x y and z coordinates to place the text. This is achieved with arguments cur or coor or poi.
poi pointnumber
Display the text in the poisition of point pointnumber of active data. Points are counted from 1.
txt text
To display a text, put it in braces or double quotes if the text contains spaces.
Related command object
Text presenter
The main command object for generating 2D text which also utilizes the tx2 command.
Examples
Ex.1: Two dimensional text
z ;# Erase screen win demo ;# Get demo window (450000 460000 6450000 6460000 1000 4000) spe bgc whi ;# Specify background color to white tx2 1.5 lle col bla txt "Text examples" ;# Lower left tx2 screen 20 40 txt "Screen coordinates" ;# Using screen coordinates tx2 1.2 coor 447000 6455000 txt "World coordinates" ;# Using world coordinates tx2 1.5 cur txt "Cursor position" ;# At cursor position
The above example produces this image.
Text examples
See also
txt - 3D text, axe - Axes display