Wiki Markup |
---|
{alias:tx2}
h2. Name
*tx2* — 2D text and legend display
h2. Command contents
[#Display 2D text on the screen] - *tx2*
[#Display 2D legend and text] - *tx2 legend*
{anchor:tx2}
{anchor:Display 2D text on the screen}
h2. Name
*tx2* — 2D text
h2. Syntax
{panel:|borderStyle=solid|borderWidth=1|bgColor=#FFFFAA}
*tx2* \[_textsize_] \[*lle | lri | ule | uri | cur | ref | min | coor | screen*] \[*nob*] \[*poi*] \[*col*] \[*fol*] \[*use*] \[*let*] \[*txt*] _text_
{panel}
h2. Description
Display a 2D text on the screen. This text is unaffected by rotation, pan and zoom, but will be affected by window resizing.
h2. Arguments
_textsize_
{indent}Will display the text using text size relative to 1.{indent}
*lle | lri | ule | uri txt* _text_
{indent}Will display text in lower left | lower right | upper left | upper right corner of the screen.{indent}
*cur | ref | min txt* _text_
{indent}Will display text at cursor position | reference point | lower left of grid window. The reference point is set by the [ref] command.{indent}
*let* _text_
{indent}Display the text as individual letters at the points of the active datasets.{indent}
*nob*
{indent}No bold numbers.{indent}
*nsh*
{indent}No shadow on numbers.{indent}
*ita*
{indent}Italic numbers.{indent}
*fam 1 | 2 | ... | 9*
{indent}Use font family 1 / 2 / 3 /.../9{indent}
*coor* _xcoor ycoor | xcoor ycoor zcoor_
{indent}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.{indent}
*screen* _xpix ypix_
{indent}Position from lower left corner in pixel positions _xpix ypix_.{indent}
*col whi | red | gre | ...*
{indent}Select color for display.{indent}
*col* _r g b_
{indent}Select color for display using _r g b_ values.{indent}
*use*
{indent}Use the current color.{indent}
*fol*
{indent}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*.{indent}
*poi* _pointnumber_
{indent}Display the text in the poisition of point _pointnumber_ of active data. Points are counted from 1.{indent}
*txt* _text_
{indent}To display a text, put it in braces or double quotes if the text contains spaces.{indent}
h2. Related command object
h3. Text presenter
The main command object for generating 2D text which also utilizes the tx2 command.
h2. Examples
h3. Ex.1: Two dimensional text
{noformat:|borderWidth=1|bgColor=#eeeeee} |
Name
tx2 — 2D text and legend display
Command contents
#Display 2D text on the screen - tx2
#Display 2D legend and text - tx2 legend
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Name
tx2 — 2D text
Syntax
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
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
No Format | ||||
---|---|---|---|---|
| ||||
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
{noformat}
|
The
...
above
...
example
...
produces
...
this
...
image.
...
Text examples
See also
txt - 3D text, axe - Axes display
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Name
tx2 legend — 2D legend color boxes and text
Syntax
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
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
No Format | ||||
---|---|---|---|---|
| ||||
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]
{noformat}
|
The
...
above
...
example
...
was
...
taken
...
from
...
the
...
command
...
Gradient
...
display
...
and
...
produces
...
this
...
image.
Legend box examples