|
|
1.1 root 1: /*
2: * $Source: /u1/X/libis/RCS/tile.c,v $
3: * $Header: tile.c,v 1.1 86/11/17 14:34:41 swick Rel $
4: */
5:
6: #ifndef lint
7: static char *rcsid_tile_c = "$Header: tile.c,v 1.1 86/11/17 14:34:41 swick Rel $";
8: #endif lint
9:
10: #include "is-copyright.h"
11:
12:
13: /* tile.c Perform a raster operation involving a pattern
14: *
15: * TileFill Patterns a portion of the screen
16: * DrawFilled Draw a filled generalized line/polygon/combination
17: *
18: * Copyright (c) 1986, Integrated Solutions, Inc.
19: */
20:
21: #include "Xis.h"
22:
23: extern PIXMAP ScreenPixmap;
24:
25: TileFill(tile, xoff, yoff, xymask, dstx, dsty, width, height, clips, clipcount, func, zmask)
26: PIXMAP *tile;
27: int xoff, yoff;
28: BITMAP *xymask;
29: int dstx, dsty;
30: int width, height;
31: register CLIP *clips;
32: register int clipcount;
33: int func;
34: int zmask;
35: {
36: CLIP bounds;
37:
38: #ifdef DEBUG
39: if (debug & D_TileFill)
40: printf("TileFill(tile=0x%x, xoff=%d, yoff=%d, xymask=0x%x,\n dstx=%d, dsty=%d, width=%d, height=%d,\n clips=0x%x, clipcount=%d, func=%d, zmask=0x%04x)\n",
41: tile, xoff, yoff, xymask, dstx, dsty, width, height,
42: clips, clipcount, func, zmask);
43: if (debug & D_TileFill_data) {
44: printf_pixmap("tile", tile);
45: printf_bitmap("xymask", xymask);
46: }
47: #endif DEBUG
48:
49: bounds.top = dsty;
50: bounds.left = dstx;
51: bounds.width = width;
52: bounds.height = height;
53: for ( ; clipcount > 0; clipcount--, ++clips) {
54:
55: /* If clip rectangle and destination bounds overlap, display
56: * character in the area the two intersect */
57: if (Overlap(clips[0], bounds)) {
58: CLIP i;
59: i = Intersection(clips[0], bounds);
60: CheckCursor(i);
61: GIP_RasterOp((unsigned char)func, tile, xoff, yoff,
62: &ScreenPixmap, i.left, i.top,
63: xymask, i.left - dstx, i.top - dsty,
64: i.width, i.height, zmask);
65: }
66: }
67: RestoreCursor();
68: }
69:
70: DrawFilled(verts, vertcount, xbase, ybase, srcpix, tile, xoff, yoff, clips, clipcount, func, zmask)
71: Vertex *verts;
72: register PIXMAP *tile;
73: int vertcount, xbase, ybase, srcpix, xoff, yoff, clipcount, zmask;
74: register int func;
75: CLIP *clips;
76: {
77: /* #ifdef DEBUG
78: if (debug & D_TileFill) */
79: printf("DrawFilled(verts=0x%x, vertcount=%d, xbase=%d, ybase=%d,\n srcpix=%d, tile=0x%x, xoff=%d, yoff=%d,\n clips=0x%x, clipcount=%d, func=%d, zmask=0x%04x)\n",
80: verts, vertcount, xbase, ybase, srcpix, tile, xoff, yoff,
81: clips, clipcount, func, zmask);
82: /* #endif DEBUG */
83: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.