1 /* Copyright (C) 1997, 1998, 2000 artofcode LLC.  All rights reserved.
2 
3   This program is free software; you can redistribute it and/or modify it
4   under the terms of the GNU General Public License as published by the
5   Free Software Foundation; either version 2 of the License, or (at your
6   option) any later version.
7 
8   This program is distributed in the hope that it will be useful, but
9   WITHOUT ANY WARRANTY; without even the implied warranty of
10   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11   General Public License for more details.
12 
13   You should have received a copy of the GNU General Public License along
14   with this program; if not, write to the Free Software Foundation, Inc.,
15   59 Temple Place, Suite 330, Boston, MA, 02111-1307.
16 
17 */
18 
19 /*$Id: gstrap.h,v 1.3.6.1.2.1 2003/01/17 00:49:03 giles Exp $ */
20 /* Definitions for trapping parameters and zones */
21 
22 #ifndef gstrap_INCLUDED
23 #  define gstrap_INCLUDED
24 
25 #include "gsparam.h"
26 
27 /* ---------------- Types and structures ---------------- */
28 
29 /* Opaque type for a path */
30 #ifndef gx_path_DEFINED
31 #  define gx_path_DEFINED
32 typedef struct gx_path_s gx_path;
33 
34 #endif
35 
36 /* Define the placement of image traps. */
37 typedef enum {
38     tp_Center,
39     tp_Choke,
40     tp_Spread,
41     tp_Normal
42 } gs_trap_placement_t;
43 
44 #define gs_trap_placement_names\
45   "Center", "Choke", "Spread", "Normal"
46 
47 /* Define a trapping parameter set. */
48 typedef struct gs_trap_params_s {
49     float BlackColorLimit;	/* 0-1 */
50     float BlackDensityLimit;	/* > 0 */
51     float BlackWidth;		/* > 0 */
52     /* ColorantZoneDetails; */
53     bool Enabled;
54     /* HalftoneName; */
55     bool ImageInternalTrapping;
56     bool ImagemaskTrapping;
57     int ImageResolution;
58     bool ImageToObjectTrapping;
59     gs_trap_placement_t ImageTrapPlacement;
60     float SlidingTrapLimit;	/* 0-1 */
61     float StepLimit;		/* 0-1 */
62     float TrapColorScaling;	/* 0-1 */
63     float TrapWidth;		/* > 0 */
64 } gs_trap_params_t;
65 
66 /* Define a trapping zone.  ****** SUBJECT TO CHANGE ****** */
67 typedef struct gs_trap_zone_s {
68     gs_trap_params_t params;
69     gx_path *zone;
70 } gs_trap_zone_t;
71 
72 /* ---------------- Procedures ---------------- */
73 
74 int gs_settrapparams(P2(gs_trap_params_t * params, gs_param_list * list));
75 
76 #endif /* gstrap_INCLUDED */
77