1: #ifndef lint
   2: static char *rcsid_copy_c = "$Header: copy.c,v 10.2 86/02/01 16:20:38 tony Rel $";
   3: #endif	lint
   4: #ifdef  sun
   5: /*
   6:  * The Sun X drivers are a product of Sun Microsystems, Inc. and are provided
   7:  * for unrestricted use provided that this legend is included on all tape
   8:  * media and as a part of the software program in whole or part.  Users
   9:  * may copy or modify these drivers without charge, but are not authorized
  10:  * to license or distribute them to anyone else except as part of a product or
  11:  * program developed by the user.
  12:  *
  13:  * THE SUN X DRIVERS ARE PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND
  14:  * INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A
  15:  * PARTICULAR PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE
  16:  * PRACTICE.
  17:  *
  18:  * The Sun X Drivers are provided with no support and without any obligation
  19:  * on the part of Sun Microsystems, Inc. to assist in their use, correction,
  20:  * modification or enhancement.
  21:  *
  22:  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
  23:  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THE SUN X
  24:  * DRIVERS OR ANY PART THEREOF.
  25:  *
  26:  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
  27:  * or profits or other special, indirect and consequential damages, even if
  28:  * Sun has been advised of the possibility of such damages.
  29:  *
  30:  * Sun Microsystems, Inc.
  31:  * 2550 Garcia Avenue
  32:  * Mountain View, California  94043
  33:  */
  34: 
  35: #ifndef lint
  36: static char sccsid[] = "@(#)copy.c 2.1 86/01/28 Copyright 1986 Sun Micro";
  37: #endif
  38: 
  39: /*-
  40:  * Copyright (c) 1986 by Sun Microsystems,  Inc.
  41:  */
  42: 
  43: /* copy.c	Copy one section of the framebuffer to another
  44:  *
  45:  *	CopyArea	Copies a section of the framebuffer
  46:  *
  47:  */
  48: 
  49: #include "Xsun.h"
  50: 
  51: extern struct pixrect *PixRect;
  52: 
  53: CopyArea (srcx, srcy, width, height, dstx, dsty, clips, clipcount, func, zmask)
  54:     int srcx, srcy, width, height, dstx, dsty, clipcount, zmask;
  55:     int func;
  56:     CLIP *clips;
  57: {
  58:     int op = SUN_FROM_X_OP(func);
  59:     int allmask = -1;
  60: 
  61:     SetZmask(PixRect, &zmask);
  62:     do {
  63:     int         cleft, ctop, cwidth, cheight;
  64: 
  65:     GetNextClip(clips, cleft, ctop, cwidth, cheight);
  66:     if (OverLap(cleft, ctop, cwidth, cheight, dstx, dsty, width, height)) {
  67:         int         tleft = (cleft > dstx ? cleft : dstx);
  68:         int         ttop = (ctop > dsty ? ctop : dsty);
  69:         int         twidth = (cleft + cwidth < dstx + width ? cleft + cwidth : dstx + width) - tleft;
  70:         int         theight = (ctop + cheight < dsty + height ? ctop + cheight : dsty + height) - ttop;
  71:         int         sx = (tleft - dstx) + srcx;
  72:         int         sy = (ttop - dsty) + srcy;
  73: 
  74:         CheckCursor(tleft, ttop, twidth, theight);
  75:         CheckCursor(sx, sy, twidth, theight);
  76:         pr_rop(PixRect, tleft, ttop, twidth, theight, op | PIX_DONTCLIP, PixRect, sx, sy);
  77:     }
  78:     } while (--clipcount > 0);
  79:     RestoreCursor();
  80:     SetZmask(PixRect, &allmask);
  81: }
  82: #endif	sun

Defined functions

CopyArea defined in line 53; never used

Defined variables

rcsid_copy_c defined in line 2; never used
sccsid defined in line 36; never used
Last modified: 1986-02-01
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 916
Valid CSS Valid XHTML 1.0 Strict