|
|
1.1 root 1: /*
2: * $Source: /u1/X/libis/RCS/fill.c,v $
3: * $Header: fill.c,v 1.1 86/11/17 14:34:04 swick Rel $
4: */
5:
6: #ifndef lint
7: static char *rcsid_fill_c = "$Header: fill.c,v 1.1 86/11/17 14:34:04 swick Rel $";
8: #endif lint
9:
10: #include "is-copyright.h"
11:
12: /* fill.c Perform a simple raster operation a section of the
13: * screen
14: *
15: * PixFill Do a function on the screen
16: *
17: * Copyright (c) 1986, Integrated Solutions, Inc.
18: */
19:
20: #include "Xis.h"
21:
22: PixFill(srcpix, xymask, dstx, dsty, width, height, clips, clipcount, func, zmask)
23: int srcpix;
24: BITMAP *xymask;
25: register int dstx, dsty;
26: int width, height;
27: register CLIP *clips;
28: register int clipcount;
29: int func;
30: int zmask;
31: {
32: CLIP bounds, i;
33: PIXMAP *fillpix;
34: extern PIXMAP *MakePixmap();
35:
36: #ifdef DEBUG
37: if (debug & D_PixFill)
38: printf("PixFill(srcpix=0x%x, xymask=0x%x, dstx=%d, dsty=%d,\n width=%d, height=%d, clips=0x%x, clipcount=%d, func=%d, zmask=0x%04x)\n",
39: srcpix, xymask, dstx, dsty, width, height, clips, clipcount,
40: func, zmask);
41: if (debug & D_PixFill_data)
42: printf_bitmap("xymask", xymask);
43: #endif DEBUG
44:
45: fillpix = MakePixmap((BITMAP *)NULL, srcpix, 0);
46:
47: bounds.top = dsty;
48: bounds.left = dstx;
49: bounds.width = width;
50: bounds.height = height;
51:
52: for ( ; clipcount; clipcount--, ++clips) {
53: if (Overlap(clips[0], bounds)) {
54: i = Intersection(clips[0], bounds);
55: CheckCursor(i);
56: GIP_RasterOp((unsigned char)func,
57: fillpix, 0, 0,
58: &ScreenPixmap, i.left, i.top,
59: xymask, i.left - dstx, i.top - dsty,
60: i.width, i.height,
61: zmask);
62: }
63:
64: }
65: RestoreCursor();
66: if (!--fillpix->refcnt)
67: FreePixmap (fillpix);
68: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.