Set_Text_Region

Functions

void DSet_Text_Region (int pCount, const HC_POINT *points, const char *options)
 Similar to Set_Text_Region, but operates on double-precision data. More...
 
void Set_Text_Region (int pCount, const HC_POINT *points, const char *options)
 Allows the user to define a region into which the currently open text string will be fitted. More...
 
void UnSet_Text_Region (void)
 Removes all settings established by a previous call to Set_Text_Region(). More...
 

Detailed Description

Function Documentation

◆ DSet_Text_Region()

void DSet_Text_Region ( int  pCount,
const HC_POINT *  points,
const char *  options 
)

Similar to Set_Text_Region, but operates on double-precision data.

Parameters
pCount- Number of (x,y,z) triplets in points. Should be either 2 or 3.
points- The set of (x,y,z) triplets which define the text region.
options- A quoted string or a string variable containing a list of the desired option settings.

◆ Set_Text_Region()

void Set_Text_Region ( int  pCount,
const HC_POINT *  points,
const char *  options 
)

Allows the user to define a region into which the currently open text string will be fitted.

Parameters
pCount- Number of (x,y,z) triplets in points. Should be either 2 or 3.
points- The set of (x,y,z) triplets which define the text region.
options- A quoted string or a string variable containing a list of the desired option settings.

DETAILS

After opening a text string in the segment hierarchy via Open_Geometry(), Set_Text_Region may be called to define a region into which 3dGS will evenly space the text string at draw time. Text_Path, Text_Alignment, and rotation values will continue to be honored.

A 2-point region behaves as if the up vector for the text is 90 degrees, counter-clockwise from the region line.

A 3-point region implies a user-defined up-vector. The 3rd point is used to determine the plane & orientation, and the point is considered to lie in the 'upper half' of the plane. If the user has a plane equation, the normal of the plane crossed with the vector between the first 2 points gives an 'up vector', which can be added to the first (or, actually, either) point to generate the third.

A region with zero points indicates that you want to unset the region.

Valid choices for options include the following:

[no] adjust direction

When set, the text will be aligned in a consistent direction in screen space, regardless of the view settings. This means that text strings will read the same whether you are looking at them from the "front" or "back". Default is "no adjust direction".

alignment = top | center | bottom

Defines how the text string will be aligned relative to the text region. The default setting is "alignment=bottom".

[no] fitting = on | off | none | spacing

By default, when text has a region attached, the first two points are treated as the baseline, and the horizontal spacing is adjusted so the ends of the text matched the line. This feature is best suited for transformable text. When text is not transformable and the camera is zoomed in or out, the text can end up crowded together or spaced out excessively. If your text is not transformable, then set the fitting option to off, so that the points define the direction of the line. The options "no fitting", "fitting=off" and "fitting=none" disable the spacing adjustment. To return to the default behavior (automatic space adjustment), use "fitting", "fitting=on" or "fitting=spacing".

[no] relative coordinates

When set, the text region coordinates will be relative to the text string position. Default is "no relative coordinates".

[no] window space

When set, the text region coordinates are assumed to be in window space coordinates. Default is "no window space".

NOTES

RESTRICTIONS

Currently the points array only supports 2 or 3 points. A rectangular region (represented by 4 points) may be supported in the future.

See also
Show_Text_Region

◆ UnSet_Text_Region()

void UnSet_Text_Region ( void  )

Removes all settings established by a previous call to Set_Text_Region().

DETAILS

No additional details. See Set_Text_Region()