|
|
1.1 root 1: /*
2: * $Source: /u1/X/libis/RCS/copy.c,v $
3: * $Header: copy.c,v 1.1 86/11/17 14:33:18 swick Rel $
4: */
5:
6: #ifndef lint
7: static char *rcsid_copy_c = "$Header: copy.c,v 1.1 86/11/17 14:33:18 swick Rel $";
8: #endif lint
9:
10: #include "is-copyright.h"
11:
12: /* copy.c Copy one section of the framebuffer to another
13: *
14: * CopyArea Copies a section of the framebuffer
15: *
16: * Copyright (c) 1986, Integrated Solutions, Inc.
17: */
18:
19: #include "Xis.h"
20:
21: CopyArea(srcx, srcy, width, height, dstx, dsty, clips, clipcount, func, zmask)
22: register int srcx, srcy;
23: int width, height;
24: register int dstx, dsty;
25: register CLIP *clips;
26: register int clipcount;
27: int func;
28: int zmask;
29: {
30: CLIP dbounds;
31:
32: #ifdef DEBUG
33: if (debug & D_CopyArea)
34: printf("CopyArea(srcx=%d, srcy=%d, width=%d, height=%d, dstx=%d, dsty=%d, clips=0x%x, clipcount=%d, func=%d, zmask=0x%04x)\n",
35: srcx, srcy, width, height, dstx, dsty, clips, clipcount, func, zmask);
36: #endif DEBUG
37:
38: dbounds.top = dsty;
39: dbounds.left = dstx;
40: dbounds.width = width;
41: dbounds.height = height;
42:
43: for ( ; clipcount; clipcount--, ++clips) {
44: if (Overlap(clips[0], dbounds)) {
45: CLIP i, sbounds;
46: i = Intersection(clips[0], dbounds);
47: CheckCursor(i);
48: sbounds.left = (i.left - dstx) + srcx;
49: sbounds.top = (i.top - dsty) + srcy;
50: sbounds.width = i.width;
51: sbounds.height = i.height;
52: CheckCursor(sbounds);
53: GIP_RasterOp((unsigned char)func,
54: &ScreenPixmap, sbounds.left, sbounds.top,
55: &ScreenPixmap, i.left, i.top,
56: (BITMAP *)NULL, 0, 0,
57: i.width, i.height, zmask);
58: }
59:
60: }
61: RestoreCursor();
62: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.