IBM Visualization Data Explorer User's Reference

[ Bottom of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]

Caption

Category

Annotation

Function

Displays a caption on the screen.

Syntax


caption = Caption(string, position, flag, reference,
                  alignment, height, font, direction, up);

Inputs
Name Type Default Description
string string or string list none the caption to be displayed
position vector [0.5 0.05] where to display the caption
flag flag 0 0: viewport-relative coordinates
1: pixel coordinates
reference vector same as position reference point on caption
alignment scalar input dependent range:
0.0: left-justify
...
1.0: right-justify
height integer 15 caption height (pixels)
font string "variable" caption font
direction vector [1 0] direction of baseline
up vector perpendicular to baseline direction of vertical strokes

Outputs
Name Type Description
caption color field string object that can be rendered

Functional Details

The caption produced is aligned in parallel with the screen.

string

is the caption to be displayed. This parameter can also be a list of strings, for a multiline caption. Alternatively, you can separate substrings for a multiline caption by using \n.

position

specifies the position of the caption in units determined by flag (see below).

flag

determines the type of coordinates used in placing the caption:

0: viewport-relative

1: pixel

reference

specifies the reference point for the caption that is to be placed at position:

[0 0] = bottom left of the caption
[1 1] = top right

If flag = 0, the default is the same as the current specification of position.

If flag = 1, the default is the lower left corner of the caption.

alignment

determines the alignment of a multiline caption from left justified (0.0) to right justified (1.0). For intermediate values, justification is defined by linear interpolation (e.g., a value of 0.5 centers the lines).

height

determines the height of the caption characters in pixels. A negative value generates an inverted caption.

font

specifies the font for a displayed caption. You can specify any of the defined fonts supplied with Data Explorer. These include a variable-width font ("variable," the default) and a fixed-width font ("fixed"):

area          gothicit_t       pitman                roman_ext
cyril_d       greek_d          roman_d               script_d
fixed         greek_s          roman_dser            script_s
gothiceng_t   italic_d         roman_s               variable
gothicger_t   italic_t         roman_tser
For more information, see Appendix E. "Data Explorer Fonts" in the IBM Visualization Data Explorer User's Guide.

direction

determines the orientation of the caption (i.e., the direction of its baseline).

up

determines the direction of the vertical strokes of the caption font.

Notes:

  1. To change the color of a caption, use the Color module (see Color).

  2. If you are using Render or Display to render an object which contains a caption, when you change the resolution of the camera the size of the caption in pixels will not change. If you want the caption to take up the same proportion of the image, use the ScaleScreen module to change the size of the caption.

Components

Creates "positions," "connections," and "colors" components.

Example Visual Programs

Many example visual programs use Caption, including:

AlternateVisualizations.net
ContoursAndCaption.net
Sealevel.net
UsingAttributes.net
UsingIsosurface.net
SIMPLE/Caption

SIMPLE/ScaleScreen.net

See Also

 Color,  Format,  Text,  ScaleScreen,  Legend


[ Top of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]
[Data Explorer Documentation | QuickStart Guide | User's Guide | User's Reference | Programmer's Reference | Installation and Configuration Guide ]

[Data Explorer Home Page | Contact Data Explorer | Same document on Data Explorer Home Page ]


[IBM Home Page | Order | Search | Contact IBM | Legal ]