wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

drawpoly.c (408B)


      1 /* Copyright ©2007-2010 Kris Maglione <maglione.k at Gmail>
      2  * See LICENSE file for license details.
      3  */
      4 #include "../x11.h"
      5 
      6 void
      7 drawpoly(Image *dst, Point *pt, int np, int cap, int w, Color *col) {
      8 	XPoint *xp;
      9 
     10 	xp = convpts(pt, np);
     11 	XSetLineAttributes(display, dst->gc, w, LineSolid, cap, JoinMiter);
     12 	setgccol(dst, col);
     13 	XDrawLines(display, dst->xid, dst->gc, xp, np, CoordModeOrigin);
     14 	free(xp);
     15 }