home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / printing / ghostscrip / source / _gs / h / gxclist < prev    next >
Encoding:
Text File  |  1991-10-25  |  2.8 KB  |  69 lines

  1. /* Copyright (C) 1991 Aladdin Enterprises.  All rights reserved.
  2.    Distributed by Free Software Foundation, Inc.
  3.  
  4. This file is part of Ghostscript.
  5.  
  6. Ghostscript is distributed in the hope that it will be useful, but
  7. WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. to anyone for the consequences of using it or for whether it serves any
  9. particular purpose or works at all, unless he says so in writing.  Refer
  10. to the Ghostscript General Public License for full details.
  11.  
  12. Everyone is granted permission to copy, modify and redistribute
  13. Ghostscript, but only under the conditions described in the Ghostscript
  14. General Public License.  A copy of this license is supposed to have been
  15. given to you along with Ghostscript so you can know your rights and
  16. responsibilities.  It should be in a file named COPYING.  Among other
  17. things, the copyright notice and this notice must be preserved on all
  18. copies.  */
  19.  
  20. /* gxclist.h */
  21. /* Command list definitions for Ghostscript. */
  22. /* Requires gxdevice.h and gxdevmem.h */
  23.  
  24. /*
  25.  * A command list is essentially a compressed list of driver calls.
  26.  * Command lists are used for several purposes:
  27.  *    - Providing a more compact representation of cached characters
  28.  *    than a full bitmap (at high resolution);
  29.  *    - Recording an image that must be rendered in bands for
  30.  *    a high-resolution printer;
  31.  *    - Representing fully rendered user paths.
  32.  * They may be used for other purposes in the future as well.
  33.  */
  34.  
  35. /* A command list device outputs commands to a stream, */
  36. /* then reads them back to render in bands. */
  37. typedef struct gx_device_clist_s gx_device_clist;
  38. typedef struct gx_clist_state_s gx_clist_state;
  39. struct gx_device_clist_s {
  40.     gx_device_common;        /* (see gxdevice.h) */
  41.     /* Following must be set before writing or reading. */
  42.     gx_device *target;        /* device for which commands */
  43.                     /* are being buffered */
  44.     byte *data;            /* buffer area */
  45.     uint data_size;            /* size of buffer */
  46.     FILE *file;            /* command list file */
  47.     /* Following are used only when writing. */
  48.     gx_clist_state *states;        /* current state of each band */
  49.     byte *cbuf;            /* start of command buffer */
  50.     byte *cnext;            /* next slot in command buffer */
  51.     byte *cend;            /* end of command buffer */
  52.     gx_clist_state *ccls;        /* clist_state of last command */
  53.     /* Following are used for both writing and reading. */
  54.     byte *tile_data;        /* data for cached tile */
  55.     uint tile_size;            /* size of tile data */
  56.     /* Following are set when writing, read when reading. */
  57.     int band_height;        /* height of each band */
  58.     int nbands;            /* # of bands */
  59.     /* Following are used only when reading. */
  60.     int ymin, ymax;            /* current band */
  61.     gx_device_memory mdev;
  62. };
  63. extern gx_device_clist
  64.     gs_clist_device;
  65.  
  66. /* The public interface to command lists */
  67. int clist_render_init(P1(gx_device_clist *));
  68. int clist_copy_scan_lines(P4(gx_device_clist *, int, byte *, uint));
  69.