START_FACE
Syntax
- Optional input arguments
-
integer hatch_type Index of the hatch pattern, as defined in %PMS_HOME%/include/sym.h. float hatch_angle Hatch angle value. float hatch_scale Hatch scaling value.
Return Values
- Success:
-
int 0 Success.
Description
This function initializes the internal storage so that subsequent polylines form the outline of the area to be hatched. There are two ways to use this function:
-
Use START_FACE with arguments and HATCH_FACE without arguments to apply a real hatch pattern to the given area.
-
Use START_FACE without arguments and HATCH_FACE with arguments to apply a simple line pattern to the given area. You can use START_HOLE to define a blank area that does not receive the line hatch.
Functions ARC and CIRCLE can also be used to hatch faces, not only polylines, provided that the lines touch each other to complete the face.
Example 1 - real hatch pattern
hatch_test( )
{
if(!ISANIMATION())
COLOR(1);
LINETYPE(1,1.00);
PEN(0);
START_FACE( HATCH_SOLID, 0.000, 1.000 );
POLY( -4.000,-4.000,
4.000,-4.000,
4.000,-4.000,
4.000,4.000,
4.000,4.000,
-4.000,4.000,
-4.000,4.000,
-4.000,-4.000 );
HATCH_FACE( );
}
Example 2 - simple line pattern
hatch_test( )
{
START_FACE( );
POLY( -20, 0,
-50, 0,
-50, 50,
50, 50,
50, 0,
20, 0);
ARC( 20, 0,
0, 0, 180);
START_HOLE( );
CIRCLE( 0, 40, 5);
style = 0; /* not used currently */
o_x = 0.0; /* not used currently */
o_y = 0.0; /* not used currently */
ang = 45.0;
spc = 2.0;
HATCH_FACE( style, o_x, o_y, ang, spc );
}