|
|
1.1 ! root 1: #include "copyright.h" ! 2: ! 3: /* $Header: XFillArc.c,v 11.9 87/09/11 08:03:00 toddb Exp $ */ ! 4: /* Copyright Massachusetts Institute of Technology 1986 */ ! 5: ! 6: #include "Xlibint.h" ! 7: ! 8: /* precompute the maximum size of batching request allowed */ ! 9: ! 10: static int size = sizeof(xPolyFillArcReq) + EPERBATCH * sizeof(xArc); ! 11: ! 12: XFillArc(dpy, d, gc, x, y, width, height, angle1, angle2) ! 13: register Display *dpy; ! 14: Drawable d; ! 15: GC gc; ! 16: int x, y; /* INT16 */ ! 17: unsigned int width, height; /* CARD16 */ ! 18: int angle1, angle2; /* INT16 */ ! 19: { ! 20: xArc *arc; ! 21: ! 22: LockDisplay(dpy); ! 23: FlushGC(dpy, gc); ! 24: { ! 25: register xPolyFillArcReq *req = (xPolyFillArcReq *) dpy->last_req; ! 26: /* if same as previous request, with same drawable, batch requests */ ! 27: if ( ! 28: (req->reqType == X_PolyFillArc) ! 29: && (req->drawable == d) ! 30: && (req->gc == gc->gid) ! 31: && ((dpy->bufptr + sizeof (xArc)) <= dpy->bufmax) ! 32: && (((char *)dpy->bufptr - (char *)req) < size) ) { ! 33: arc = (xArc *) dpy->bufptr; ! 34: req->length += sizeof (xArc) >> 2; ! 35: dpy->bufptr += sizeof (xArc); ! 36: } ! 37: ! 38: else { ! 39: GetReqExtra(PolyFillArc, sizeof(xArc), req); ! 40: ! 41: req->drawable = d; ! 42: req->gc = gc->gid; ! 43: arc = (xArc *) (req + 1); ! 44: } ! 45: arc->x = x; ! 46: arc->y = y; ! 47: arc->width = width; ! 48: arc->height = height; ! 49: arc->angle1 = angle1; ! 50: arc->angle2 = angle2; ! 51: } ! 52: UnlockDisplay(dpy); ! 53: SyncHandle(); ! 54: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.