Name
tx2 — 2D text and legend display
Command contents
#Display 2D text on the screen - tx2
#Display 2D legend and text - tx2 legend
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 affected by window resizing.
Arguments
textsize
lle | lri | ule | uri txt text
cur | ref | min txt text
let text
nob
nsh
ita
fam 1 | 2 | ... | 9
coor xcoor ycoor | xcoor ycoor zcoor
screen xpix ypix
col whi | red | gre | ...
col r g b
use
fol
poi pointnumber
txt text
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
Name
tx2 legend — 2D legend color boxes and text
Syntax
tx2 [textsize] [ boxboxsize] [nfr | onlytxt | lef | cur | coor | space | xwid | ywid | xad | yad | col | tcol] [* txt* text]
Description
Display 2D legend color boxes and text on the screen. The legend and text is unaffected by rotation, pan and zoom, but will be affected by window resizing.
Arguments
textsize
boxsize
nfr
onlytxt
lef
cur [coor | world worldXcoordinate worldYcoordinate | screen screenXcoordinate screenYcoordinate]
coor pixelXcoordinate pixelYcoordinate]
space
xwid
ywid
xad
yad
col r g b
tcol r g b | [whi | red | gre | bla ...]
txt text
Examples
Ex.1: Legend boxes and text
z ;# Erase screen d2 variable plane_max 0.1 variable rise_max 0.3 variable maybe_rise_max 0.5 variable maybe_slope_max 0.7 variable col1 "0.7 0.3 0.6" variable col2 "1.0 1.0 0.7" variable col3 "0.7 1.0 0.7" variable col4 ".5 0.6 0.4" variable col5 "0.8 0.7 1.0" eval col $col5 tx2 legend 1 box 0.7 coor 20 20 eval col $col1 tx2 legend 1 box 0.7 coor 20 40 eval col $col2 tx2 legend 1 box 0.7 coor 20 60 eval col $col3 tx2 legend 1 box 0.7 coor 20 80 eval col $col4 tx2 legend 1 box 0.7 coor 20 100 eval [tx2 0.7 txt "$plane_max degrees" screen 40 30 col whi sha] eval [tx2 0.7 txt "$rise_max degrees" screen 40 50 col whi sha] eval [tx2 0.7 txt "$maybe_rise_max degrees" screen 40 70 col whi sha] eval [tx2 0.7 txt "$maybe_slope_max degrees" screen 40 90 col whi sha]
The above example was taken from the command Gradient display and produces this image.
Legend box examples