HOOPS/3dGS I.M. Interface

     << Back      Full Index      Forward >>


New_User_Line_Pattern


Functions

HT_User_Line_Pattern * New_User_Line_Pattern (HT_Rendition *nr, int count, unsigned short *upat)
void Set_User_Line_Pattern (HT_Rendition *nr, HT_User_Line_Pattern *upat)

Function Documentation

HT_User_Line_Pattern * New_User_Line_Pattern HT_Rendition *  nr,
int  count,
unsigned short *  upat
 

Creates a customized line pattern.

Parameters:
nr - Rendition created with HIC_New_Rendition.Passed by reference always
count - The number of values inupat
upat - an array of unsigned short bytes whose values indicate the lengths of the dashes and spaces in the pattern.
Returns:
new_pattern - Pointer to user pattern descriptor structure. See below for details.

DETAILS

An array containing {10,10} would draw a pattern of 10 pixels alternating with a 10 pixel space -- a small dash pattern. An array like {20,4,8,4} would be a long dash, tiny space, short dash, tiny space. If "count" is odd, the array is effectively repeated to make it even, therefore {12,6,18} behaves as if it were {12,6,18,12,6,18}

To use the line pattern, simply create the pattern, set it in the rendition, and draw:


     HT_User_Line_Pattern * my_line_pattern;
     my_line_pattern =  HIC_New_User_Line_Pattern (rendition, count, lengths);

     HT_Rendition my_rendition = HIC_New_Rendition (rendition);
       HIC_Set_User_Line_Pattern (my_line_pattern);
       HIC_Draw_DC_Polyline (my_rendition, point_count, points);
     HIC_Free_Rendition (my_rendition);

NOTES

RESTRICTIONS

See also:
Free_User_Line_Pattern, New_User_Line_Pattern2

void Set_User_Line_Pattern HT_Rendition *  nr,
HT_User_Line_Pattern *  upat
 

Applies a user line pattern to a rendition created with HIC_New_Rendition().

Parameters:
nr - Rendition created with HIC_New_Rendition.Passed by reference.
upat - A pointer to an HT_User_Line_Pattern descriptor returned by HIC_New_User_Line_Pattern(). Passed by reference.

DETAILS

No additional details. See HIC_New_User_Line_Pattern().

See also:
Free_User_Line_Pattern, New_User_Line_Pattern2
Main Index

HOOPS/3dGS I.M. Interface

     << Back      Full Index      Forward >>