Commit | Line | Data |
---|---|---|
cee1d2b1 WJ |
1 | /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. |
2 | Distributed by Free Software Foundation, Inc. | |
3 | ||
4 | This file is part of Ghostscript. | |
5 | ||
6 | Ghostscript is distributed in the hope that it will be useful, but | |
7 | WITHOUT ANY WARRANTY. No author or distributor accepts responsibility | |
8 | to anyone for the consequences of using it or for whether it serves any | |
9 | particular purpose or works at all, unless he says so in writing. Refer | |
10 | to the Ghostscript General Public License for full details. | |
11 | ||
12 | Everyone is granted permission to copy, modify and redistribute | |
13 | Ghostscript, but only under the conditions described in the Ghostscript | |
14 | General Public License. A copy of this license is supposed to have been | |
15 | given to you along with Ghostscript so you can know your rights and | |
16 | responsibilities. It should be in a file named COPYING. Among other | |
17 | things, the copyright notice and this notice must be preserved on all | |
18 | copies. */ | |
19 | ||
20 | /* gzstate.h */ | |
21 | /* Private graphics state definition for Ghostscript library */ | |
22 | /* Requires gxmatrix.h and gxfixed.h */ | |
23 | #include "gsstate.h" | |
24 | ||
25 | /* Graphics state structure. See pp. 59-60 of the PostScript manual. */ | |
26 | struct gs_state_s { | |
27 | gs_state *saved; /* previous state from gsave */ | |
28 | gs_memory_procs memory_procs; | |
29 | /* Transformation: */ | |
30 | gs_matrix_fixed ctm; | |
31 | #define ctm_only(pgs) *(gs_matrix *)&(pgs)->ctm | |
32 | gs_matrix ctm_inverse; | |
33 | int inverse_valid; /* true if ctm_inverse = ctm^-1 */ | |
34 | /* Paths: */ | |
35 | struct gx_path_s *path; | |
36 | struct gx_clip_path_s *clip_path; | |
37 | int clip_rule; | |
38 | /* Lines: */ | |
39 | struct line_params_s *line_params; | |
40 | /* Halftone screen: */ | |
41 | struct halftone_params_s *halftone; | |
42 | float (*ht_proc)(P2(floatp, floatp)); | |
43 | gs_int_point ht_phase; | |
44 | gs_int_point phase_mod; /* negated phase mod tile size */ | |
45 | /* Colors: */ | |
46 | struct gs_color_s *color; | |
47 | struct gx_device_color_s *dev_color; | |
48 | struct gx_transfer_s *transfer; | |
49 | /* Font: */ | |
50 | struct gs_font_s *font; | |
51 | gs_matrix char_tm; /* font matrix * ctm */ | |
52 | int char_tm_valid; /* true if char_tm is valid */ | |
53 | byte in_cachedevice; /* true after a setcachedevice */ | |
54 | byte in_charpath; /* 0 if not in charpath, */ | |
55 | /* 1 if false charpath, */ | |
56 | /* 2 if true charpath */ | |
57 | /* (see charpath_flag in */ | |
58 | /* gs_show_enum_s) */ | |
59 | /* Other stuff: */ | |
60 | int level; /* incremented by 1 per gsave */ | |
61 | float flatness; | |
62 | int stroke_adjust; | |
63 | struct device_s *device; | |
64 | int device_is_shared; /* true if device is shared, */ | |
65 | /* so don't deallocate at grestore */ | |
66 | }; |