|
|
1.1 root 1: #include "copyright.h"
2:
3: /* $Header: XSetCRects.c,v 11.13 87/08/24 18:53:17 newman Exp $ */
4: /* Copyright Massachusetts Institute of Technology 1986 */
5:
6: #include "Xlibint.h"
7:
8: XSetClipRectangles (dpy, gc, clip_x_origin, clip_y_origin, rectangles, n,
9: ordering)
10: register Display *dpy;
11: GC gc;
12: int clip_x_origin, clip_y_origin;
13: XRectangle *rectangles;
14: int n;
15: int ordering;
16: {
17: LockDisplay(dpy);
18: _XSetClipRectangles (dpy, gc, clip_x_origin, clip_y_origin, rectangles, n,
19: ordering)
20: UnlockDisplay(dpy);
21: SyncHandle();
22: }
23:
24: /* can only call when display is locked. */
25: _XSetClipRectangles (dpy, gc, clip_x_origin, clip_y_origin, rectangles, n,
26: ordering)
27: register Display *dpy;
28: GC gc;
29: int clip_x_origin, clip_y_origin;
30: XRectangle *rectangles;
31: int n;
32: int ordering;
33: {
34: register xSetClipRectanglesReq *req;
35: register long nbytes;
36:
37: GetReq (SetClipRectangles, req);
38: req->gc = gc->gid;
39: req->xOrigin = gc->values.clip_x_origin = clip_x_origin;
40: req->yOrigin = gc->values.clip_y_origin = clip_y_origin;
41: req->ordering = ordering;
42: req->length += n * (sizeof (xRectangle)/4);
43: gc->rects = 1;
44: nbytes = (long)n * sizeof(xRectangle);
45: PackData (dpy, (char *) rectangles, nbytes);
46: gc->dirty &= ~(GCClipMask | GCClipXOrigin | GCClipYOrigin);
47: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.