1 /* Copyright (C) 1997, 1998, 2000 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: gstrap.h,v 1.6 2002/06/16 08:45:42 lpd Exp $ */ 18 /* Definitions for trapping parameters and zones */ 19 20 #ifndef gstrap_INCLUDED 21 # define gstrap_INCLUDED 22 23 #include "gsparam.h" 24 25 /* ---------------- Types and structures ---------------- */ 26 27 /* Opaque type for a path */ 28 #ifndef gx_path_DEFINED 29 # define gx_path_DEFINED 30 typedef struct gx_path_s gx_path; 31 32 #endif 33 34 /* Define the placement of image traps. */ 35 typedef enum { 36 tp_Center, 37 tp_Choke, 38 tp_Spread, 39 tp_Normal 40 } gs_trap_placement_t; 41 42 #define gs_trap_placement_names\ 43 "Center", "Choke", "Spread", "Normal" 44 45 /* Define a trapping parameter set. */ 46 typedef struct gs_trap_params_s { 47 float BlackColorLimit; /* 0-1 */ 48 float BlackDensityLimit; /* > 0 */ 49 float BlackWidth; /* > 0 */ 50 /* ColorantZoneDetails; */ 51 bool Enabled; 52 /* HalftoneName; */ 53 bool ImageInternalTrapping; 54 bool ImagemaskTrapping; 55 int ImageResolution; 56 bool ImageToObjectTrapping; 57 gs_trap_placement_t ImageTrapPlacement; 58 float SlidingTrapLimit; /* 0-1 */ 59 float StepLimit; /* 0-1 */ 60 float TrapColorScaling; /* 0-1 */ 61 float TrapWidth; /* > 0 */ 62 } gs_trap_params_t; 63 64 /* Define a trapping zone. ****** SUBJECT TO CHANGE ****** */ 65 typedef struct gs_trap_zone_s { 66 gs_trap_params_t params; 67 gx_path *zone; 68 } gs_trap_zone_t; 69 70 /* ---------------- Procedures ---------------- */ 71 72 int gs_settrapparams(gs_trap_params_t * params, gs_param_list * list); 73 74 #endif /* gstrap_INCLUDED */ 75