7 addcoord(uchar *p, int oldx, int newx)
12 /* does dx fit in 7 signed bits? */
13 if((unsigned)(dx - -0x40) <= 0x7F)
16 *p++ = 0x80 | (newx&0x7F);
25 dopoly(int cmd, Image *dst, Point *pp, int np, int end0, int end1, int radius, Image *src, Point *sp, Drawop op)
38 u = addcoord(u, ox, pp[i].x);
40 u = addcoord(u, oy, pp[i].y);
44 _setdrawop(dst->display, op);
46 a = bufimage(dst->display, 1+4+2+4+4+4+4+2*4+(u-t));
49 fprint(2, "image poly: %r\n");
58 BPLONG(a+19, src->id);
61 memmove(a+31, t, u-t);
66 poly(Image *dst, Point *p, int np, int end0, int end1, int radius, Image *src, Point sp)
68 dopoly('p', dst, p, np, end0, end1, radius, src, &sp, SoverD);
72 polyop(Image *dst, Point *p, int np, int end0, int end1, int radius, Image *src, Point sp, Drawop op)
74 dopoly('p', dst, p, np, end0, end1, radius, src, &sp, op);
78 fillpoly(Image *dst, Point *p, int np, int wind, Image *src, Point sp)
80 dopoly('P', dst, p, np, wind, 0, 0, src, &sp, SoverD);
84 fillpolyop(Image *dst, Point *p, int np, int wind, Image *src, Point sp, Drawop op)
86 dopoly('P', dst, p, np, wind, 0, 0, src, &sp, op);