home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume3 / awm2 / part10 / StoreZap.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-02-21  |  3.7 KB  |  121 lines

  1.  
  2.  
  3.  
  4. #ifndef lint
  5. static char *rcsid_StoreZap_c = "$Header: /usr/graph2/X11.3/contrib/windowmgrs/awm/RCS/StoreZap.c,v 1.1 89/01/23 15:34:55 jkh Exp $";
  6. #endif    lint
  7.  
  8. #include "X11/copyright.h"
  9. /*
  10.  *
  11.  * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
  12.  *
  13.  * Copyright 1987 by Jordan Hubbard.
  14.  *
  15.  *
  16.  *                         All Rights Reserved
  17.  *
  18.  * Permission to use, copy, modify, and distribute this software and its
  19.  * documentation for any purpose and without fee is hereby granted,
  20.  * provided that the above copyright notice appear in all copies and that
  21.  * both that copyright notice and this permission notice appear in
  22.  * supporting documentation, and that the name of Ardent Computer
  23.  * Corporation or Jordan Hubbard not be used in advertising or publicity
  24.  * pertaining to distribution of the software without specific, written
  25.  * prior permission.
  26.  *
  27.  */
  28.  
  29. /*
  30.  * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
  31.  *
  32.  *                         All Rights Reserved
  33.  *
  34.  * Permission to use, copy, modify, and distribute this software and its
  35.  * documentation for any purpose and without fee is hereby granted,
  36.  * provided that the above copyright notice appear in all copies and that
  37.  * both that copyright notice and this permission notice appear in
  38.  * supporting documentation, and that the name of Digital Equipment
  39.  * Corporation not be used in advertising or publicity pertaining to
  40.  * distribution of the software without specific, written prior permission.
  41.  *
  42.  *
  43.  * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  44.  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  45.  * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  46.  * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  47.  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  48.  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  49.  * SOFTWARE.
  50.  */
  51.  
  52.  
  53.  
  54. /*
  55.  * MODIFICATION HISTORY
  56.  *
  57.  * 000 -- M. Gancarz, DEC Ultrix Engineering Group
  58.  * 001 -- Loretta Guarino Reid, DEC Ultrix Engineering Group,
  59.     Western Software Lab. Convert to X11.
  60.  */
  61.  
  62. /*
  63.  *    StoreZap - This subroutine is used by the X Window Manager (xwm)
  64.  *    to store the vertices for the iconify, uniconify zap.
  65.  *
  66.  */
  67.  
  68. #include "awm.h"
  69.  
  70. /*
  71.  * Store the vertices for the zap effect.
  72.  */
  73. int StoreZap(zap, ulx_1, uly_1, lrx_1, lry_1, ulx_2, uly_2, lrx_2, lry_2)
  74.     register XSegment zap[];
  75.     int ulx_1;        /* From window, upper left X coordinate. */
  76.     int uly_1;        /* From window, upper left Y coordinate. */
  77.     int lrx_1;        /* From window, lower right X coordinate. */
  78.     int lry_1;        /* From window, lower right Y coordinate. */
  79.     int ulx_2;        /* To window, upper left X coordinate. */
  80.     int uly_2;        /* To window, upper left Y coordinate. */
  81.     int lrx_2;        /* To window, lower right X coordinate. */
  82.     int lry_2;        /* To window, lower right Y coordinate. */
  83. {
  84.  
  85.     Entry("StoreZap")
  86.  
  87.     /*
  88.      * Xor in.
  89.      */
  90.     zap[0].x1 = ulx_1;    zap[0].y1 = uly_1;
  91.     zap[0].x2 = ulx_2;    zap[0].y2 = uly_2;
  92.  
  93.     zap[1].x1 = lrx_1;    zap[1].y1 = uly_1;
  94.     zap[1].x2 = lrx_2;    zap[1].y2 = uly_2;
  95.  
  96.     zap[2].x1 = lrx_1;    zap[2].y1 = lry_1;
  97.     zap[2].x2 = lrx_2;    zap[2].y2 = lry_2;
  98.  
  99.     zap[3].x1 = ulx_1;    zap[3].y1 = lry_1;
  100.     zap[3].x2 = ulx_2;    zap[3].y2 = lry_2;
  101.  
  102.     /*
  103.      * Xor out.
  104.      */
  105.     zap[4].x1 = ulx_1;    zap[4].y1 = uly_1;
  106.     zap[4].x2 = ulx_2;    zap[4].y2 = uly_2;
  107.  
  108.     zap[5].x1 = lrx_1;    zap[5].y1 = uly_1;
  109.     zap[5].x2 = lrx_2;    zap[5].y2 = uly_2;
  110.  
  111.     zap[6].x1 = lrx_1;    zap[6].y1 = lry_1;
  112.     zap[6].x2 = lrx_2;    zap[6].y2 = lry_2;
  113.  
  114.     zap[7].x1 = ulx_1;    zap[7].y1 = lry_1;
  115.     zap[7].x2 = ulx_2;    zap[7].y2 = lry_2;
  116.     /*
  117.      * Total number of vertices is 8.
  118.      */
  119.     Leave(8)
  120. }
  121.