4
/* A polygon is drawn using the current color. It has "number"
5
* verticies which are found in the absolute coordinate pairs
6
* represented in the "xarray" and "yarray" arrays. NOTE: Cursor
7
* location is NOT updated in Polygon_rel(). */
9
void XD_Polygon_abs(const int *xarray, const int *yarray, int number)
11
XPoint *xpnts = alloc_xpoints(number);
17
for (i = 0; i < number; i++) {
18
xpnts[i].x = (short)xarray[i];
19
xpnts[i].y = (short)yarray[i];
22
XFillPolygon(dpy, bkupmap, gc, xpnts, number, Complex, CoordModeOrigin);
26
void XD_Polygon_rel(const int *xarray, const int *yarray, int number)
28
XPoint *xpnts = alloc_xpoints(number);
34
xpnts[0].x = (short)(xarray[0] + cur_x);
35
xpnts[0].y = (short)(yarray[0] + cur_y);
37
for (i = 1; i < number; i++) {
38
xpnts[i].x = (short)xarray[i];
39
xpnts[i].y = (short)yarray[i];
42
XFillPolygon(dpy, bkupmap, gc, xpnts, number, Complex, CoordModePrevious);