1 /* Copyright (C) 2001-2019 Artifex Software, Inc.
2    All Rights Reserved.
3 
4    This software is provided AS-IS with no warranty, either express or
5    implied.
6 
7    This software is distributed under license and may not be copied,
8    modified or distributed except as expressly authorized under the terms
9    of the license contained in the file LICENSE in this distribution.
10 
11    Refer to licensing information at http://www.artifex.com or contact
12    Artifex Software, Inc.,  1305 Grant Avenue - Suite 200, Novato,
13    CA 94945, U.S.A., +1(415)492-9861, for further information.
14 */
15 
16 
17 /* Tiled mask clipping device and interface */
18 
19 #ifndef gxclip2_INCLUDED
20 #  define gxclip2_INCLUDED
21 
22 #include "gxmclip.h"
23 
24 /* The structure for tile clipping is the same as for simple mask clipping. */
25 typedef gx_device_mask_clip gx_device_tile_clip;
26 #define st_device_tile_clip st_device_mask_clip
27 /*
28  * We can't just make this macro empty, since it is processed as a top-level
29  * declaration and would lead to an extraneous semicolon.  The least damage
30  * we can do is make it declare a constant (and not static, since static
31  * would lead to a compiler warning about an unreferenced variable).
32  */
33 #define private_st_device_tile_clip() /* in gxclip2.c */\
34   const byte gxclip2_dummy = 0
35 
36 /*
37  * Initialize a tile clipping device from a mask.
38  * We supply an explicit phase.
39  */
40 int tile_clip_initialize(gx_device_tile_clip * cdev,
41                          const gx_strip_bitmap * tiles,
42                          gx_device * tdev, int px, int py);
43 
44 /*
45  * Free the tile clipping device.
46  */
47 void tile_clip_free(gx_device_tile_clip *cdev);
48 
49 /*
50  * Set the phase of the tile -- used in the tiling loop when
51  * the tile doesn't simply fill the plane.
52  */
53 void tile_clip_set_phase(gx_device_tile_clip * cdev, int px, int py);
54 
55 #endif /* gxclip2_INCLUDED */
56