PostScriptPolygon
Syntax | ||
int PostScriptPolygon(struct PostScript *ptr, struct PostScriptMatrix *matrix, float x,float y, int num,float *px,float *py,int *t,int fill, unsigned int color,float width, struct PostScriptDash *dash,struct PostScriptClip *clip); | ||
Header | ||
base/rps.h | ||
Library | ||
rps | ||
Description | ||
The The argument ptr is a pointer to the PostScript control structure . The argument matrix is an optional transformation matrix that can be applied to the polygon. If this is set to a The number of vertices of the polygon is given by the argument num. The arrays containing the X and Y coordinates of each vertex are pointed to by the arguments x and y. A polygon can be constructed from straight line segments or bezier curves. The array pointed to by the argument t determines what kind of line segment is used to join to a vertex. If the corresponding entry in the array equals zero, then the segment between the current point and the next point is a straight line; if the entry is (1) then the connecting segment is a bezier curve and the next two vertices are the control points, the curve connects to the third point. If the argument fill is set to a non-zero value then the polygon will be plotted as solid shape, not an outline. The color used to plot the polygon is given by the color which is a 24-bit number that represents the red,green and blue components of the color as 8-bit number. The alpha red occupies the most significant bits and the blue channel occupies the least significant bits. The width of the line used to plot the polygon is controlled using the argument width, a value of zero will plot a hairline. The dot-dash pattern used to plot the polygon is given by dash. If this is set to a The clipping polygon is given by the argument clip. If this is set to a | ||
Returns | ||
Returns zero on success. On error, (-1) is returned. | ||
Errors | ||
Returns zero on success. On error, (-1) is returned. | ||
Example | ||
PostScriptPolygon
|