Set_Text_Alignment

Functions

void Set_Text_Alignment (const char *locater)
 Determines where in each chunk of text the "reference point" is to fall. More...
 
void UnSet_Text_Alignment (void)
 Removes all settings established by a previous call to Set_Text_Alignment(). More...
 

Detailed Description

Function Documentation

◆ Set_Text_Alignment()

void Set_Text_Alignment ( const char *  locater)

Determines where in each chunk of text the "reference point" is to fall.

Parameters
locater- A one or two character string, chosen from ^, v, *, <, or >.

DETAILS

When you insert text strings, you only specify one x-y-z coordinate position. Sometimes, when labelling menu buttons for instance, it will be convenient for that position to specify where the center of the text string should land. Other times, when putting up a page of help text for example, it would be convenient if the position specified where the upper left corner should land. The Text Alignment attribute gives you control over this placement.

Your choice is specified as a one- or two-character string. Choices are

-----------------------------------------------------------------------------
"^"  Requests that the X-height always be aligned at the specified elevation.  
"v"  Requests that the baseline is used for alignment instead.                 
"<"  Left edge.                                                                
">"  Right edge.                                                               
"*"  Align along a center line, either up and down or left and right.          
-----------------------------------------------------------------------------
For example,
--------------------------------------------------
"v"  Use the baseline left corner for alignment.   
"<^"  Use the X-height left corner.                 
"*^"  Use the center of the X-height edge.          
"<>"  Conflicting---not a legal choice.             
"**"  Use the overall center.                       
"*"   Same as "**".                                 
--------------------------------------------------
etc.
Blocks of multiline text (text that has been inserted using line separators) have additional placement controls:
-----------------------------------------------------------------------------
"["  Requests that strings in the text block are left justified.
"|"  Requests that strings in the text block are center justified.
"]"  Requests that strings in the text block are right justified.
-----------------------------------------------------------------------------

By default text alignment aligns around a box which is parallel to the screen-space X&Y axes. This works sufficiently when the text path is standard left to right. However, when the text path is non-orthogonal you can get unexpected results. The "." modifier says that HOOPS should align about a box which is tightly fitted around the text regardless of its text-path.

NOTES

Leading and trailing blanks count for alignment purposes.

An Edit operation will cause the alignment to be recomputed.

When other text attributes are set to nondefault values (Text_Path, Text_Font (rotation), etc.), the alignment is calculated based on a box surrounding the entire string.

RESTRICTIONS

See also
Insert_Text, Edit_Text, Set_Text_Font, Set_Text_Path.

◆ UnSet_Text_Alignment()

void UnSet_Text_Alignment ( void  )

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

DETAILS

No additional details. See Set_Text_Alignment()