home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume12 / postscript / part01 / source / canon.c next >
Encoding:
C/C++ Source or Header  |  1987-10-27  |  1.3 KB  |  56 lines

  1. /*
  2.  * Copyright (C) Rutherford Appleton Laboratory 1987
  3.  * 
  4.  * This source may be copied, distributed, altered or used, but not sold for profit
  5.  * or incorporated into a product except under licence from the author.
  6.  * It is not in the public domain.
  7.  * This notice should remain in the source unaltered, and any changes to the source
  8.  * made by persons other than the author should be marked as such.
  9.  * 
  10.  *    Crispin Goswell @ Rutherford Appleton Laboratory caag@uk.ac.rl.vd
  11.  */
  12. #include "main.h"
  13. #include "graphics.h"
  14. #include "canon.h"
  15.  
  16. int pixels_per_inch;
  17.  
  18. int single_rop [] =
  19.  {
  20.     ROP_FALSE, ROP_DEST, ROP_NOTDEST, ROP_TRUE,
  21.     ROP_FALSE, ROP_DEST, ROP_NOTDEST, ROP_TRUE,
  22.     ROP_FALSE, ROP_DEST, ROP_NOTDEST, ROP_TRUE,
  23.     ROP_FALSE, ROP_DEST, ROP_NOTDEST, ROP_TRUE
  24.  };
  25.  
  26. /*ARGSUSED*/
  27. Matrix DeviceMatrix (width, height) int width, height;
  28.  {
  29.      return NewMatrix (pixels_per_inch / 72.0, 0.0, 0.0, -pixels_per_inch / 72.0, 0.0, (float) height);
  30.  }
  31.  
  32. void HardUpdate ()
  33.  {
  34.  }
  35.  
  36. int IsWindowHardware (h) struct hardware *h;
  37.  {
  38.      return h->flags & ISWIN;
  39.  }
  40.  
  41. #define IsWindowHardware(h) ((h)->flags & ISWIN)
  42.  
  43. DevicePoint HardwareExtent (h) struct hardware *h;
  44.  {
  45.      if (h)
  46.          return h->extent;
  47.      else
  48.          return NewDevicePoint (0, 0);
  49.  }
  50.  
  51. void SetClipHardware (h, clip) struct hardware *h, *clip;
  52.  {
  53.      if (h)
  54.         h->clip = clip;
  55.  }
  56.