![]() |
![]() |
![]() |
![]() |
Text
Synopsis
Define a single Graphics Display Kit text string
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 */
};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;
};TextAttribs Text_NoXform {
string str; /* string to render */
int nspace;
float position[nspace]; /* vert to render string at */
int stroke = 0;
StrokeTextAttribs StrokeTextAttribs;
};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
Parameters
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.
This parameter is a boolean that controls if a bounding box is rendered around the text string: 0 means no; 1 means yes.
This parameter is a boolean that controls if the text string is underlined: 0 means no; 1 means yes.
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.
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.
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.
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.
This parameter is a vector of length nspace that contains the position at which to render the text string.
Parameters (for stroke text only)
Used in conjunction with the orient and angle subobjects, this parameter specifies the transformation for the character string. Valid values are:
Used in conjunction with the plane and angle subobjects, specifies the transformation for the character string. Valid values are:
This parameter specifies the angle of rotation on the specified plane for arbitrary orientation. Valid values are between -180.00 and 180.00.
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.
This parameter modifies the default character spacing. Specifying a value greater than 0.0 increases the spacing between characters.
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.
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
Example
Libraries.Visualization.Geometries.TextString Libraries.Visualization.Geometries.TextString3D
File
See also related modules
![]() |
![]() |
![]() |
![]() |