xref: /plan9/sys/src/cmd/gs/src/gsht1.h (revision 593dc095aefb2a85c828727bbfa9da139a49bdf4)
1 /* Copyright (C) 1994, 1997 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: gsht1.h,v 1.5 2002/06/16 08:45:42 lpd Exp $ */
18 /* Extended public interface to halftones */
19 
20 #ifndef gsht1_INCLUDED
21 #  define gsht1_INCLUDED
22 
23 #include "gsht.h"
24 
25 /* Procedural interface */
26 int gs_setcolorscreen(gs_state *, gs_colorscreen_halftone *);
27 int gs_currentcolorscreen(gs_state *, gs_colorscreen_halftone *);
28 
29 /*
30  * We include sethalftone here, even though it is a Level 2 feature,
31  * because it turns out to be convenient to define setcolorscreen
32  * using sethalftone.
33  */
34 #ifndef gs_halftone_DEFINED
35 #  define gs_halftone_DEFINED
36 typedef struct gs_halftone_s gs_halftone;
37 
38 #endif
39 /*
40  * gs_halftone structures may have complex substructures.  We provide two
41  * procedures for setting them.  gs_halftone assumes that the gs_halftone
42  * structure and all its substructures was allocated with the same allocator
43  * as the gs_state; gs_halftone_allocated looks in the structure itself (the
44  * rc.memory member) to find the allocator that was used.  Both procedures
45  * copy the top-level structure (using the appropriate allocator), but take
46  * ownership of the substructures.
47  */
48 int gs_sethalftone(gs_state *, gs_halftone *);
49 int gs_sethalftone_allocated(gs_state *, gs_halftone *);
50 int gs_currenthalftone(gs_state *, gs_halftone *);
51 
52 #endif /* gsht1_INCLUDED */
53