xref: /plan9/sys/src/cmd/gs/src/gxclipsr.h (revision 593dc095aefb2a85c828727bbfa9da139a49bdf4)
1 /* Copyright (C) 1998 Aladdin Enterprises.  All rights reserved.
2 
3   This software is provided AS-IS with no warranty, either express or
4   implied.
5 
6   This software is distributed under license and may not be copied,
7   modified or distributed except as expressly authorized under the terms
8   of the license contained in the file LICENSE in this distribution.
9 
10   For more information about licensing, please refer to
11   http://www.ghostscript.com/licensing/. For information on
12   commercial licensing, go to http://www.artifex.com/licensing/ or
13   contact Artifex Software, Inc., 101 Lucas Valley Road #110,
14   San Rafael, CA  94903, U.S.A., +1(415)492-9861.
15 */
16 
17 /* $Id: gxclipsr.h,v 1.4 2002/02/21 22:24:53 giles Exp $ */
18 /* Internals of clipsave/cliprestore */
19 
20 #ifndef gxclipsr_INCLUDED
21 #  define gxclipsr_INCLUDED
22 
23 #include "gsrefct.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 #ifndef gx_clip_path_DEFINED
33 #  define gx_clip_path_DEFINED
34 typedef struct gx_clip_path_s gx_clip_path;
35 #endif
36 #ifndef gx_clip_stack_DEFINED
37 #  define gx_clip_stack_DEFINED
38 typedef struct gx_clip_stack_s gx_clip_stack_t;
39 #endif
40 
41 struct gx_clip_stack_s {
42     rc_header rc;
43     gx_clip_path *clip_path;
44     gx_clip_stack_t *next;
45 };
46 
47 #define private_st_clip_stack()	/* in gsclipsr.c */\
48   gs_private_st_ptrs2(st_clip_stack, gx_clip_stack_t,\
49     "gx_clip_stack_t", clip_stack_enum_ptrs, clip_stack_reloc_ptrs,\
50     clip_path, next)
51 
52 #endif /* gxclipsr_INCLUDED */
53