1 /* Copyright (C) 2001-2012 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., 7 Mt. Lassen Drive - Suite A-134, San Rafael, 13 CA 94903, U.S.A., +1(415)492-9861, for further information. 14 */ 15 16 17 /* Extended public interface to halftones */ 18 19 #ifndef gsht1_INCLUDED 20 # define gsht1_INCLUDED 21 22 #include "gsht.h" 23 24 /* Procedural interface */ 25 int gs_setcolorscreen(gs_state *, gs_colorscreen_halftone *); 26 int gs_currentcolorscreen(gs_state *, gs_colorscreen_halftone *); 27 28 /* 29 * We include sethalftone here, even though it is a Level 2 feature, 30 * because it turns out to be convenient to define setcolorscreen 31 * using sethalftone. 32 */ 33 #ifndef gs_halftone_DEFINED 34 # define gs_halftone_DEFINED 35 typedef struct gs_halftone_s gs_halftone; 36 37 #endif 38 /* 39 * gs_halftone structures may have complex substructures. We provide two 40 * procedures for setting them. gs_halftone assumes that the gs_halftone 41 * structure and all its substructures was allocated with the same allocator 42 * as the gs_state; gs_halftone_allocated looks in the structure itself (the 43 * rc.memory member) to find the allocator that was used. Both procedures 44 * copy the top-level structure (using the appropriate allocator), but take 45 * ownership of the substructures. 46 */ 47 int gs_sethalftone(gs_state *, gs_halftone *); 48 int gs_sethalftone_allocated(gs_state *, gs_halftone *); 49 int gs_currenthalftone(gs_state *, gs_halftone *); 50 51 #endif /* gsht1_INCLUDED */ 52