Compute_Text_Outline

Functions

void Compute_Text_Outline (const char *segment, const char *text, int *pcount, HC_POINT *points, int *flist_length, int *face_list)
 Calculates a polyhedral representation of the given text glyphs. More...
 
void Compute_Text_Outline_By_Key (HC_KEY key, int *pcount, HC_POINT *points, int *flist_length, int *face_list)
 Similar to Compute_Text_Outline(), but operates on an object referenced by an HC_KEY. More...
 
void Compute_Text_Outline_By_Path (int count, const HC_KEY *keys, const char *text, int *pcount, HC_POINT *points, int *flist_length, int *face_list)
 Similar to Compute_Text_Outline(), but concatenates the matrices along a segment path rather than the specified segment. More...
 
void Compute_Text_Outline_Size (const char *segment, const char *text, int *pcount, int *flist_length)
 Finds out the size of the text outline. This is useful for determining the size of the points array needed to store incoming data from Compute_Text_Outline(). More...
 
void Compute_Text_Outline_Size_By (HC_KEY key, int *pcount, int *flist_length)
 Similar to Compute_Text_Outline_Size(), but enables the user to pass in a key for the desired text object. More...
 
void Compute_Text_Outline_Size_By_Path (int count, const HC_KEY *keys, const char *text, int *pcount, int *flist_length)
 Similar to Compute_Text_Outline(), but concatenates the matrices along a segment path rather than the specified segment. More...
 
void Compute_Text_Outline_Size_Wi (const char *segment, const char *encoding, const char *etext, int *pcount, int *flist_length)
 Similar to Compute_Text_Outline_Size(), but operates on encoded text rather than Latin1 text. More...
 
void Compute_Text_Outline_With_En (const char *segment, const char *encoding, const char *etext, int *pcount, HC_POINT *points, int *flist_length, int *face_list)
 Similar to Compute_Text_Outline(), but operates on encoded text rather than Latin1 text. More...
 

Detailed Description

Function Documentation

◆ Compute_Text_Outline()

void Compute_Text_Outline ( const char *  segment,
const char *  text,
int *  pcount,
HC_POINT *  points,
int *  flist_length,
int *  face_list 
)

Calculates a polyhedral representation of the given text glyphs.

Parameters
segment- The segment whose attributes (or net attributes) will be applied to the problem.
text- The text string whose outline is to be computed.
pcount- Number of valid points in points. Returned to caller. Passed by reference always.
points- Vector of x-y-z triplets for the coordinates of the vertices to be used to build the outline. (A simple N x 3 array may also be used.) Returned to caller. Passed by reference always.
flist_length- Total number of integers in face_list. Returned to caller. Passed by reference always.
face_list- Encoded description of how to connect the points to build the faces of the outline. Returned to caller. Passed by reference always.

DETAILS

Often, setting the path or alignment of text isn't enough to acheive certain effects. For example, one might want to "warp" text characters or render them under the influence of light sources or a texture map. In these instances, normal Hoops text is not flexible enough, but other Hoops geometries are. Compute_Text_Outline() is the gateway between text characters and their geometric representations.

The output of these routines is exactly like Show_Shell() and its variants. The data collected from Compute_Text_Outline() can be passed directly to Insert_Shell() . Shells can be subjected to a wide range of transformations and renderings.

You can use Compute_Text_Outline_Size() to determine how large the points and face_list arrays are going to need to be, before you actually call Compute_Text_Outline() .

The text attributes in effect within the segment are taken into account when generating the outline, obeying the typeface selection, size, etc.

The points that are returned will all lie in the z=0 plane, and will be scaled down by the text size so that the glyphs will nominally be of unit height, with protruding ascenders and descenders. Even if the text has already been inserted at some position in a segment, the resulting points will be returned with (0,0,0) as the first character's origin. Since the geometric representation has the same physical dimensions, no matter which text size is chosen, text size may be used to control the resolution of the generated outline. Increasing the text size gives you more points, not a larger figure.

NOTES

Some of the routine names look odd because they've been truncated at 31 characters.

RESTRICTIONS

Not all text fonts have outline representations. If you request an outline from a text font and one cannot be generated, a warning message is issued. You should use Show_Font_Info() to determine if a font is "outlineable".

See also
Insert_Text, Show_Font_Info, Show_Net_Text_Font, Show_Net_Text_Path, Show_Net_Text_Alignment, Show_Device_Info, Show_Font_Info, Show_Text, Show_Text_Encoding, Compute_Coordinates, Compute_Text_Extent, Compute_Transform

◆ Compute_Text_Outline_By_Key()

void Compute_Text_Outline_By_Key ( HC_KEY  key,
int *  pcount,
HC_POINT *  points,
int *  flist_length,
int *  face_list 
)

Similar to Compute_Text_Outline(), but operates on an object referenced by an HC_KEY.

Parameters
key- The numeric identifier returned by a previous call to Insert_Text() or Insert_Text_With_Encoding() .
pcount- Number of valid points in points. Returned to caller. Passed by reference always.
points- Vector of x-y-z triplets for the coordinates of the vertices to be used to build the outline. (A simple N x 3 array may also be used.) Returned to caller. Passed by reference always.
flist_length- Total number of integers in face_list. Returned to caller. Passed by reference always.
face_list- Encoded description of how to connect the points to build the faces of the outline. Returned to caller. Passed by reference always.

DETAILS

No additional details. See Compute_Text_Outline()

◆ Compute_Text_Outline_By_Path()

void Compute_Text_Outline_By_Path ( int  count,
const HC_KEY *  keys,
const char *  text,
int *  pcount,
HC_POINT *  points,
int *  flist_length,
int *  face_list 
)

Similar to Compute_Text_Outline(), but concatenates the matrices along a segment path rather than the specified segment.

Parameters
count- The size of the keys array
keys- The array of keys starting with the text key (or effective owning segment if a text string is explicitly specified) and following all the way back to the root segment or other desired segment.
text- The text string whose outline is to be computed. ignored if first key in path is a text key.
pcount- Number of valid points in points. Returned to caller. Passed by reference always.
points- Vector of x-y-z triplets for the coordinates of the vertices to be used to build the outline. (A simple N x 3 array may also be used.) Returned to caller. Passed by reference always.
flist_length- Total number of integers in face_list. Returned to caller. Passed by reference always.
face_list- Encoded description of how to connect the points to build the faces of the outline. Returned to caller. Passed by reference always.

DETAILS

No additional details. See Compute_Text_Outline().

◆ Compute_Text_Outline_Size()

void Compute_Text_Outline_Size ( const char *  segment,
const char *  text,
int *  pcount,
int *  flist_length 
)

Finds out the size of the text outline. This is useful for determining the size of the points array needed to store incoming data from Compute_Text_Outline().

Parameters
segment- The segment whose attributes (or net attributes) will be applied to the problem.
text- The text string whose outline is to be computed.
pcount- Number of valid points in points. Returned to caller. Passed by reference always.
flist_length- Total number of integers in face_list. Returned to caller. Passed by reference always.

DETAILS

No additional details. See Compute_Text_Outline()

◆ Compute_Text_Outline_Size_By()

void Compute_Text_Outline_Size_By ( HC_KEY  key,
int *  pcount,
int *  flist_length 
)

Similar to Compute_Text_Outline_Size(), but enables the user to pass in a key for the desired text object.

Parameters
key- The numeric identifier returned by a previous call to Insert_Text() or Insert_Text_With_Encoding() .
pcount- Number of valid points in points. Returned to caller. Passed by reference always.
flist_length- Total number of integers in face_list. Returned to caller. Passed by reference always.

DETAILS

No additional details. See Compute_Text_Outline()

◆ Compute_Text_Outline_Size_By_Path()

void Compute_Text_Outline_Size_By_Path ( int  count,
const HC_KEY *  keys,
const char *  text,
int *  pcount,
int *  flist_length 
)

Similar to Compute_Text_Outline(), but concatenates the matrices along a segment path rather than the specified segment.

Parameters
count- The size of the keys array
keys- The array of keys starting with the text key (or effective owning segment if a text string is explicitly specified) and following all the way back to the root segment or other desired segment.
text- The text string whose outline is to be computed. ignored if first key in path is a text key.
pcount- Number of valid points in points. Returned to caller. Passed by reference always.
flist_length- Total number of integers in face_list. Returned to caller. Passed by reference always.

DETAILS

No additional details. See Compute_Text_Outline().

◆ Compute_Text_Outline_Size_Wi()

void Compute_Text_Outline_Size_Wi ( const char *  segment,
const char *  encoding,
const char *  etext,
int *  pcount,
int *  flist_length 
)

Similar to Compute_Text_Outline_Size(), but operates on encoded text rather than Latin1 text.

Parameters
segment- The segment whose attributes (or net attributes) will be applied to the problem.
encoding- The encoding method used for text.
etext- Same as text, but encoded as in Insert_Text_With_Encoding() .
pcount- Number of valid points in points. Returned to caller. Passed by reference always.
flist_length- Total number of integers in face_list. Returned to caller. Passed by reference always.

DETAILS

No additional details. See Compute_Text_Outline()

◆ Compute_Text_Outline_With_En()

void Compute_Text_Outline_With_En ( const char *  segment,
const char *  encoding,
const char *  etext,
int *  pcount,
HC_POINT *  points,
int *  flist_length,
int *  face_list 
)

Similar to Compute_Text_Outline(), but operates on encoded text rather than Latin1 text.

Parameters
segment- The segment whose attributes (or net attributes) will be applied to the problem.
encoding- The encoding method used for text.
etext- Same as text, but encoded as in Insert_Text_With_Encoding() .
pcount- Number of valid points in points. Returned to caller. Passed by reference always.
points- Vector of x-y-z triplets for the coordinates of the vertices to be used to build the outline. (A simple N x 3 array may also be used.) Returned to caller. Passed by reference always.
flist_length- Total number of integers in face_list. Returned to caller. Passed by reference always.
face_list- Encoded description of how to connect the points to build the faces of the outline. Returned to caller. Passed by reference always.

DETAILS

No additional details. See Compute_Text_Outline()