Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{alias:tx2}

Name

tx2 — 2D text and legend display

Command contents

#Display Display 2D text on the screen - tx2
#Display Display 2D legend and text - tx2 legend

...

Panel
bgColor#FFFFAA
borderWidth1
borderStylesolid

tx2 [textsize] [lle | lri | ule | uri | jri | jce | jle | cur | ref | min | coor | screen] [nob] [poi] [col] [fol] [use] [let] [txt] text

...

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

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.

jri | jce | jle txt text

Will do right justification (jri), center justification (jce), or left justififaction (jle) (which is default) of the text position.

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

...

No Format
bgColor#eeeeee
borderWidth1

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

...

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

Will display the text using text size relative to 1.

boxsize

Will display the legend boxes using size relative to 1.

nfr

No frame. Will display the legend boxes without a frame.

onlytxt

Only text. Will display only the legend text.

lef

Will display the legend text to the left.

cur [coor | world worldXcoordinate worldYcoordinate | screen screenXcoordinate screenYcoordinate]

Will display text at cursor screen position | cursor coordinate position | specific coordinate position.

coor pixelXcoordinate pixelYcoordinate]

Will display text at specified coordinate pixel position.

space

Space between the legend boxes.

xwid

The x width of the legend boxes.

ywid

The y width of the legend boxes.

xad

The x addition of the legend boxes.

yad

The y addition of the legend boxes.

col r g b

Select color for legend box display using r g b values.

tcol r g b | [whi | red | gre | bla ...]

Select text color for display using r g b values or color mnemonics.

txt text

Optional legend text. To display a text, put it in braces or double quotes if the text contains spaces.
It may also be appropriate to use the tx2 command directly to create a legend text, see example.

Examples

Ex.1: Legend boxes and text

No Format
bgColor#eeeeee
borderWidth1

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]

...