TOC PREV NEXT INDEX

Text

Synopsis

Define a single Graphics Display Kit text string

TextAttribs

group TextAttribs {
int align_horiz; /* enumerated GD_ALIGN_HORIZ_xxx */
int align_vert; /* enumerated GD_ALIGN_VERT_xxx */
int drop_shadow; /* boolean option */
int background; /* boolean option */
int bounds; /* boolean option */
int underline; /* boolean option */
int lead_line; /* boolean option */
int radial; /* boolean option */
int do_offset; /* boolean option */
float offset[3];
int xform_mode; /* boolean option */
};

StrokeTextAttribs

group StrokeTextAttribs {
int font_type;
int style;
int plane;
int orient;
int path;
int space_mode;
float spacing;
float angle;
float height;
float expansion;
float width;
};

Text_NoXform

TextAttribs Text_NoXform {
string str; /* string to render */
int nspace;
float position[nspace]; /* vert to render string at */
int stroke = 0;
StrokeTextAttribs StrokeTextAttribs;
};

Text

Text_NoXform+Xform Text {
float+write min_vec[nspace];
float+write max_vec[nspace];
};

Description

These templates define a Graphics Display Kit text string. TextAttribs and StrokeTextAttribs define the set of attributes that apply to text that is rendered in the Graphics Display Kit. Text_NoXform adds the string and the position of the string. Text adds a transformation and extents vectors. Text is what is normally instanced and used as the data that is connected to a Graphics Display Kit object to be rendered.

Input

str

A string. Contains the string to be rendered.

Parameters

align_horiz

This parameter controls the horizontal alignment of the text string.
Value
Meaning
Symbolic contant
0
Left
GD_ALIGN_HORIZ_LEFT
1
Center
GD_ALIGN_HORIZ_CENTER
2
Right
GD_ALIGN_HORIZ_RIGHT

align_vert

This parameter controls the vertical alignment of the text string.
Value
Meaning
Symbolic contant
0
Base
GD_ALIGN_VERT_BASE
1
Bottom
GD_ALIGN_VERT_BOTTOM
2
Center
GD_ALIGN_VERT_CENTER
3
Top
GD_ALIGN_VERT_TOP

drop_shadow

This parameter is a boolean that controls if a drop shadow is rendered: 0 means no; 1 means yes.backgroundThis parameter is a boolean that controls if a background is rendered with the view's background color: 0 means no; 1 means yes.

bounds

This parameter is a boolean that controls if a bounding box is rendered around the text string: 0 means no; 1 means yes.

underline

This parameter is a boolean that controls if the text string is underlined: 0 means no; 1 means yes.

lead_line

This parameter is a boolean that controls if a line is rendered from the text position to the position where the text is actually rendered: 0 means no; 1 means yes. The position that the text is rendered at is the text position plus the offset if it is enabled.

radial

This parameter is a boolean that causes automatic text alignment and offset away from the center of the view: 0 means no; 1 means yes.If radial is set, the align_horiz parameter is overriden. Alignment then works in the following manner. If the text X position is to the left of center, the text string is right aligned. If the text X position is to the right of center, the text string is left aligned.The offset is used when the do_offset parameter is set but it is used in a different manner. The radius of the offset is used to position the text away from the center. In the upper right quadrant, this is towards the upper right. In the lower right quadrant, this is towards the lower right. In the upper left quadrant, this is towards the upper left. In the lower left quadrant, this is towards the lower left.

do_offset

This parameter is a boolean that controls if the offset is to be added to the text position prior to rendering: 0 means no; 1 means yes.

offset

This parameter is an NDC offset that is added to the text position prior to rendering. The do_offset parameter controls whether the offset is used.

nspace

This parameter controls the dimensionality of the text position. Valid values are 2 or 3.

position

This parameter is a vector of length nspace that contains the position at which to render the text string.

Parameters (for stroke text only)

font_type

This controls the type of font displayed. Possible options are:
Roman simplex
Script simplex
Italic complex
Greek simplex
Roman duplex
Script complex
Italic triplex
Greek complex
Roman complex



Roman triplex



plane

Used in conjunction with the orient and angle subobjects, this parameter specifies the transformation for the character string. Valid values are:
Value
Meaning
Symbolic Constant
0
XY plane
VECFONT_PLANE_XY
1
XZ plane
VECFONT_PLANE_XZ
2
YZ plane
VECFONT_PLANE_YZ

orient

Used in conjunction with the plane and angle subobjects, specifies the transformation for the character string. Valid values are:
Value
Meaning
Symbolic Constant
0
Left to right
VECFONT_ORIENT_LTOR
1
Up
VECFONT_ORIENT_UP
2
Right to left
VECFONT_ORIENT_RTOL
3
Down
VECFONT_ORIENT_DOWN
4
Arbitrary
VECFONT_ORIENT_ARB

angle

This parameter specifies the angle of rotation on the specified plane for arbitrary orientation. Valid values are between -180.00 and 180.00.

path

This parameter specifies the direction of the text path. Valid values are:
Value
Meaning
Symbolic Constant
0
Left to right.
VECFONT_PATH_LTOR
1
Up
VECFONT_PATH_UP
2
Right to left
VECFONT_PATH_RTOL
3
Down
VECFONT_PATH_DOWN

space_mode

This parameter specifies fixed or proportional spacing. Valid values are 0 for fixed spacing and 1 for proportional spacing. Default character spacing is set to 0.0.

spacing

This parameter modifies the default character spacing. Specifying a value greater than 0.0 increases the spacing between characters.

height

This parameter specifies the height of the character; the default character height is 1.0. It is used as a scale factor for both the height and width of the character.

expansion

This parameter specifies the width of the character. The default value is 1.0. Values less than 1.0 will make the characters narrower; values greater than 1.0 make the characters wider.

Output Port

xform

A DefaultXform. The transformation to be applied to the text position.

Example

Libraries.Visualization.Geometries.TextString Libraries.Visualization.Geometries.TextString3D

File

v/fld.v

See also related modules

TextString and TextString3D

TOC PREV NEXT INDEX