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}
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.
!att:_img_ref^cmd_tx2.png!
_Text examples_
h2. See also
[txt - 3D text], [axe - Axes display]
{anchor:tx2 legend}
{anchor:Display 2D legend and text}
h2. Name
*tx2 legend* — 2D legend color boxes and text
h2. Syntax
{panel:|borderStyle=solid|borderWidth=1|bgColor=#FFFFAA}
*tx2* \[_textsize_] \[ *box*_boxsize_] \[*nfr | onlytxt | lef | cur | coor | space | xwid | ywid | xad | yad | col | tcol*] \[* txt* _text_]
{panel}
h2. 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.
h2. Arguments
_textsize_
{indent}Will display the text using text size relative to 1.{indent}
_boxsize_
{indent}Will display the legend boxes using size relative to 1.{indent}
*nfr*
{indent}No frame. Will display the legend boxes without a frame.{indent}
*onlytxt*
{indent}Only text. Will display only the legend text.{indent}
*lef*
{indent}Will display the legend text to the left.{indent}
*cur* \[*coor* | *world* _worldXcoordinate_ _worldYcoordinate_ | *screen* _screenXcoordinate_ _screenYcoordinate_]
{indent}Will display text at cursor screen position | cursor coordinate position | specific coordinate position.{indent}
*coor* _pixelXcoordinate_ _pixelYcoordinate_]
{indent}Will display text at cursor pixel position.{indent}
*space*
{indent}Space between the legend boxes.{indent}
*xwid*
{indent}The x width of the legend boxes.{indent}
*ywid*
{indent}The y width of the legend boxes.{indent}
*xad*
{indent}The x addition of the legend boxes.{indent}
*yad*
{indent}The y addition of the legend boxes.{indent}
*col* _r g b_
{indent}Select color for legend box display using _r g b_ values.{indent}
*tcol* _r g b_ | \[*whi | red | gre | bla ...*]
{indent}Select text color for display using _r g b_ values or color mnemonics.{indent}
*txt* _text_
{indent}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.{indent}
h2. Examples
h3. Ex.1: Legend boxes and text
{noformat:|borderWidth=1|bgColor=#eeeeee}
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.
!att:_img_ref^cmd_tx2_legend.png!
_Legend box examples_
h2. See also
[cco - Color code legend]
{pagebreak} |
Page Comparison
General
Content
Integrations