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 /* Internals of clipsave/cliprestore */
18 
19 #ifndef gxclipsr_INCLUDED
20 #  define gxclipsr_INCLUDED
21 
22 #include "gsrefct.h"
23 #include "gxpath.h"
24 
25 /*
26  * Unlike the graphics state stack, which is threaded through the actual
27  * gstate objects, the clipping path stack is implemented with separate,
28  * small objects.  These are reference-counted, because they may be
29  * shared by off-stack graphics states.
30  */
31 
32 typedef struct gx_clip_stack_s gx_clip_stack_t;
33 
34 struct gx_clip_stack_s {
35     rc_header rc;
36     gx_clip_path *clip_path;
37     gx_clip_stack_t *next;
38 };
39 
40 #define private_st_clip_stack()	/* in gsclipsr.c */\
41   gs_private_st_ptrs2(st_clip_stack, gx_clip_stack_t,\
42     "gx_clip_stack_t", clip_stack_enum_ptrs, clip_stack_reloc_ptrs,\
43     clip_path, next)
44 
45 #endif /* gxclipsr_INCLUDED */
46