home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / sharewar / dos / program / gs300sr1 / gs300sr1.exe / GXCLIP2.H < prev    next >
Text File  |  1994-07-27  |  2KB  |  50 lines

  1. /* Copyright (C) 1993 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of Aladdin Ghostscript.
  4.   
  5.   Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
  6.   or distributor accepts any responsibility for the consequences of using it,
  7.   or for whether it serves any particular purpose or works at all, unless he
  8.   or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
  9.   License (the "License") for full details.
  10.   
  11.   Every copy of Aladdin Ghostscript must include a copy of the License,
  12.   normally in a plain ASCII text file named PUBLIC.  The License grants you
  13.   the right to copy, modify and redistribute Aladdin Ghostscript, but only
  14.   under certain conditions described in the License.  Among other things, the
  15.   License requires that the copyright notice and this notice be preserved on
  16.   all copies.
  17. */
  18.  
  19. /* gxclip2.h */
  20. /* Mask clipping device and interface */
  21. /* Requires gxdevice.h, gxdevmem.h */
  22.  
  23. /*
  24.  * Patterns that don't completely fill their bounding boxes require
  25.  * the ability to clip against a tiled mask.  For now, we only support
  26.  * tiling parallel to the axes.
  27.  */
  28.  
  29. #define tile_clip_buffer_request 128
  30. #define tile_clip_buffer_size\
  31.   ((tile_clip_buffer_request / arch_sizeof_long) * arch_sizeof_long)
  32. typedef struct gx_device_tile_clip_s {
  33.     gx_device_forward_common;    /* target is set by client */
  34.     gx_tile_bitmap tile;
  35.     gx_device_memory mdev;        /* for tile buffer for copy_mono */
  36.     gs_int_point phase;        /* should this really be here?? */
  37.     /* Ensure that the buffer is long-aligned. */
  38.     union _b {
  39.         byte bytes[tile_clip_buffer_size];
  40.         ulong longs[tile_clip_buffer_size / arch_sizeof_long];
  41.     } buffer;
  42. } gx_device_tile_clip;
  43. #define private_st_device_tile_clip() /* in gxclip2.c */\
  44.   gs_private_st_simple(st_device_tile_clip, gx_device_tile_clip,\
  45.     "gx_device_tile_clip")
  46.  
  47. /* Initialize a tile clipping device from a mask. */
  48. int tile_clip_initialize(P3(gx_device_tile_clip *, gx_tile_bitmap *,
  49.   gx_device *));
  50.