HC_Compute_Text_Outline

void HC_Compute_Text_Outline(char const *segment, char const *text, int *pcount, Point points[], int *flist_length, int face_list[])
void HC_Compute_Text_Outline(char const segment, char const text, int pcount, Point points, int flist_length, int face_list)

Calculates a polyhedral representation of the given text glyphs.

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.

HC_Insert_Text, HC_Show_Font_Info, HC_PShow_Net_Text_Font, HC_PShow_Net_Text_Path, HC_PShow_Net_Text_Alignment, HC_Show_Device_Info, HC_Show_Font_Info, HC_Show_Text, HC_Show_Text_Encoding, HC_Compute_Coordinates, HC_Compute_Text_Extent, HC_Compute_Transform

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.