|
|
1.1 ! root 1: #ifndef lint ! 2: static char *rcsid_fill_c = "$Header: fill.c,v 10.1 86/11/29 13:51:52 jg Rel $"; ! 3: #endif lint ! 4: /* ! 5: ! 6: Copyright 1986 by the University of Utah ! 7: ! 8: Permission to use, copy, modify, and distribute this ! 9: software and its documentation for any purpose and without ! 10: fee is hereby granted, provided that the above copyright ! 11: notice appear in all copies and that both that copyright ! 12: notice and this permission notice appear in supporting ! 13: documentation, and that the name of the University of Utah ! 14: not be used in advertising or publicity pertaining to ! 15: distribution of the software without specific, written ! 16: prior permission. The University of Utah makes no ! 17: representations about the suitability of this software for ! 18: any purpose. It is provided "as is" without express or ! 19: implied warranty. ! 20: ! 21: */ ! 22: ! 23: /* fill.c Perform a simple raster operation a section of the screen ! 24: * ! 25: * PixFill Do a function on the screen ! 26: * ! 27: */ ! 28: ! 29: #include "Xapollo.h" ! 30: extern int old_op; ! 31: ! 32: /*ARGSUSED*/ ! 33: PixFill (srcpix, xymask, dstx, dsty, width, height, clips, clipcount, ! 34: func, zmask) ! 35: int srcpix, dstx, dsty, width, height, clipcount, zmask; ! 36: register BITMAP *xymask; ! 37: register int func; ! 38: CLIP *clips; ! 39: { ! 40: int i; ! 41: ! 42: gpr_$window_t window, cwindow; ! 43: boolean active; ! 44: status_$t status; ! 45: gpr_$position_t dest; ! 46: ! 47: /* Need to sort out the func/srcpix interactions here; the ! 48: following special case is for gemacs' curosr ! 49: */ ! 50: if ((func == GXxor) && (srcpix == 1)) ! 51: func = 10; ! 52: if (xymask == NULL) { ! 53: set_zmask(zmask); ! 54: set_op( func ); ! 55: window.x_coord = dstx; ! 56: window.y_coord = dsty; ! 57: window.x_size = width; ! 58: window.y_size = height; ! 59: do { ! 60: GetNextClip(clips, cwindow); ! 61: CheckCursor(dstx, dsty, width, height); ! 62: gpr_$set_clip_window( cwindow, status); ! 63: ! 64: if (func == 3) { ! 65: gpr_$set_fill_value((gpr_$pixel_value_t)srcpix, status); ! 66: gpr_$rectangle(window, status); ! 67: } ! 68: else /* just blit screen to self */ ! 69: { ! 70: dest.x_coord = dstx; ! 71: dest.y_coord = dsty; ! 72: gpr_$bit_blt(Screen.bm, window, (short)0, dest, (short)0, status); ! 73: } ! 74: } while (--clipcount > 0); ! 75: } else { ! 76: fprintf(stderr,"PixFill: op=%d, srcpix=%d, xymask=%d\n", ! 77: func, srcpix, xymask); ! 78: } ! 79: RestoreCursor(); ! 80: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.