|
|
1.1 ! root 1: #include "copyright.h" ! 2: ! 3: /* $Header: XDrSegs.c,v 11.8 87/09/11 08:15:31 toddb Exp $ */ ! 4: /* Copyright Massachusetts Institute of Technology 1986 */ ! 5: ! 6: #include "Xlibint.h" ! 7: ! 8: XDrawSegments (dpy, d, gc, segments, nsegments) ! 9: register Display *dpy; ! 10: Drawable d; ! 11: GC gc; ! 12: XSegment *segments; ! 13: int nsegments; ! 14: { ! 15: register xPolySegmentReq *req; ! 16: long nbytes; ! 17: ! 18: LockDisplay(dpy); ! 19: FlushGC(dpy, gc); ! 20: GetReq (PolySegment, req); ! 21: req->drawable = d; ! 22: req->gc = gc->gid; ! 23: req->length += nsegments<<1; ! 24: /* each segment is 4 16-bit integers, i.e. 2*32 bits */ ! 25: nbytes = nsegments << 3; ! 26: /* do this here, not in arguments to PackData, since PackData ! 27: may be a macro which uses its arguments more than once */ ! 28: PackData (dpy, (char *) segments, nbytes); ! 29: UnlockDisplay(dpy); ! 30: SyncHandle(); ! 31: } ! 32:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.