~ubuntu-branches/ubuntu/jaunty/ghostscript/jaunty-updates

« back to all changes in this revision

Viewing changes to base/gdevcgmx.h

  • Committer: Bazaar Package Importer
  • Author(s): Till Kamppeter
  • Date: 2009-01-20 16:40:45 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090120164045-lnfhi0n30o5lwhwa
Tags: 8.64.dfsg.1~svn9377-0ubuntu1
* New upstream release (SVN rev 9377)
   o Fixes many bugs concerning PDF rendering, to make the PDF printing
     workflow correctly working.
   o Fixes long-standing bugs in many drivers, like input paper tray and
     duplex options not working for the built-in PCL 4, 5, 5c, 5e, and
     6/XL drivers, PDF input not working for bjc600, bjc800, and cups
     output devices, several options not working and uninitialized
     memory with cups output device.
   o Merged nearly all patches of the Ubuntu and Debian packages upstream.
   o Fixes LP: #317810, LP: #314439, LP: #314018.
* debian/patches/03_libpaper_support.dpatch,
  debian/patches/11_gs-cjk_font_glyph_handling_fix.dpatch,
  debian/patches/12_gs-cjk_vertical_writing_metrics_fix.dpatch,
  debian/patches/13_gs-cjk_cjkps_examples.dpatch,
  debian/patches/20_bbox_segv_fix.dpatch,
  debian/patches/21_brother_7x0_gdi_fix.dpatch,
  debian/patches/22_epsn_margin_workaround.dpatch,
  debian/patches/24_gs_man_fix.dpatch,
  debian/patches/25_toolbin_insecure_tmp_usage_fix.dpatch,
  debian/patches/26_assorted_script_fixes.dpatch,
  debian/patches/29_gs_css_fix.dpatch,
  debian/patches/30_ps2pdf_man_improvement.dpatch,
  debian/patches/31_fix-gc-sigbus.dpatch,
  debian/patches/34_ftbfs-on-hurd-fix.dpatch,
  debian/patches/35_disable_libcairo.dpatch,
  debian/patches/38_pxl-duplex.dpatch,
  debian/patches/39_pxl-resolution.dpatch,
  debian/patches/42_gs-init-ps-delaybind-fix.dpatch,
  debian/patches/45_bjc600-bjc800-pdf-input.dpatch,
  debian/patches/48_cups-output-device-pdf-duplex-uninitialized-memory-fix.dpatch,
  debian/patches/50_lips4-floating-point-exception.dpatch,
  debian/patches/52_cups-device-logging.dpatch,
  debian/patches/55_pcl-input-slot-fix.dpatch,
  debian/patches/57_pxl-input-slot-fix.dpatch,
  debian/patches/60_pxl-cups-driver-pdf.dpatch,
  debian/patches/62_onebitcmyk-pdf.dpatch,
  debian/patches/65_too-big-temp-files-1.dpatch,
  debian/patches/67_too-big-temp-files-2.dpatch,
  debian/patches/70_take-into-account-data-in-stream-buffer-before-refill.dpatch:
  Removed, applied upstream.
* debian/patches/01_docdir_fix_for_debian.dpatch,
  debian/patches/02_gs_man_fix_debian.dpatch,
  debian/patches/01_docdir-fix-for-debian.dpatch,
  debian/patches/02_docdir-fix-for-debian.dpatch: Renamed patches to
  make merging with Debian easier.
* debian/patches/32_improve-handling-of-media-size-changes-from-gv.dpatch, 
  debian/patches/33_bad-params-to-xinitimage-on-large-bitmaps.dpatch:
  regenerated for new source directory structure.
* debian/rules: Corrected paths to remove cidfmap (it is in Resource/Init/
  in GS 8.64) and to install headers (source paths are psi/ and base/ now).
* debian/rules: Remove all fontmaps, as DeFoMa replaces them.
* debian/local/pdftoraster/pdftoraster.c,
  debian/local/pdftoraster/pdftoraster.convs, debian/rules: Removed
  added pdftoraster filter and use the one which comes with Ghostscript.
* debian/ghostscript.links: s/8.63/8.64/

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2001-2006 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, modified
 
8
   or distributed except as expressly authorized under the terms of that
 
9
   license.  Refer to licensing information at http://www.artifex.com/
 
10
   or contact Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134,
 
11
   San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
 
12
*/
 
13
/* $Id: gdevcgmx.h 8022 2007-06-05 22:23:38Z giles $ */
 
14
/* Internal definitions for CGM-writing library */
 
15
 
 
16
#ifndef gdevcgmx_INCLUDED
 
17
#  define gdevcgmx_INCLUDED
 
18
 
 
19
#include "gdevcgml.h"
 
20
 
 
21
/* Define the internal representations of the CGM opcodes. */
 
22
#define cgm_op_class_shift 7
 
23
#define cgm_op_id_shift 5
 
24
typedef enum {
 
25
    /* Class 0 */
 
26
    BEGIN_METAFILE = (0 << cgm_op_class_shift) + 1,
 
27
    END_METAFILE,
 
28
    BEGIN_PICTURE,
 
29
    BEGIN_PICTURE_BODY,
 
30
    END_PICTURE,
 
31
    /* Class 1 */
 
32
    METAFILE_VERSION = (1 << cgm_op_class_shift) + 1,
 
33
    METAFILE_DESCRIPTION,
 
34
    VDC_TYPE,
 
35
    INTEGER_PRECISION,
 
36
    REAL_PRECISION,
 
37
    INDEX_PRECISION,
 
38
    COLOR_PRECISION,
 
39
    COLOR_INDEX_PRECISION,
 
40
    MAXIMUM_COLOR_INDEX,
 
41
    COLOR_VALUE_EXTENT,
 
42
    METAFILE_ELEMENT_LIST,
 
43
    METAFILE_DEFAULTS_REPLACEMENT,
 
44
    FONT_LIST,
 
45
    CHARACTER_SET_LIST,
 
46
    CHARACTER_CODING_ANNOUNCER,
 
47
    /* Class 2 */
 
48
    SCALING_MODE = (2 << cgm_op_class_shift) + 1,
 
49
    COLOR_SELECTION_MODE,
 
50
    LINE_WIDTH_SPECIFICATION_MODE,
 
51
    MARKER_SIZE_SPECIFICATION_MODE,
 
52
    EDGE_WIDTH_SPECIFICATION_MODE,
 
53
    VDC_EXTENT,
 
54
    BACKGROUND_COLOR,
 
55
    /* Class 3 */
 
56
    VDC_INTEGER_PRECISION = (3 << cgm_op_class_shift) + 1,
 
57
    VDC_REAL_PRECISION,
 
58
    AUXILIARY_COLOR,
 
59
    TRANSPARENCY,
 
60
    CLIP_RECTANGLE,
 
61
    CLIP_INDICATOR,
 
62
    /* Class 4 */
 
63
    POLYLINE = (4 << cgm_op_class_shift) + 1,
 
64
    DISJOINT_POLYLINE,
 
65
    POLYMARKER,
 
66
    TEXT,
 
67
    RESTRICTED_TEXT,
 
68
    APPEND_TEXT,
 
69
    POLYGON,
 
70
    POLYGON_SET,
 
71
    CELL_ARRAY,
 
72
    GENERALIZED_DRAWING_PRIMITIVE,
 
73
    RECTANGLE,
 
74
    CIRCLE,
 
75
    CIRCULAR_ARC_3_POINT,
 
76
    CIRCULAR_ARC_3_POINT_CLOSE,
 
77
    CIRCULAR_ARC_CENTER,
 
78
    CIRCULAR_ARC_CENTER_CLOSE,
 
79
    ELLIPSE,
 
80
    ELLIPTICAL_ARC,
 
81
    ELLIPTICAL_ARC_CLOSE,
 
82
    /* Class 5 */
 
83
    LINE_BUNDLE_INDEX = (5 << cgm_op_class_shift) + 1,
 
84
    LINE_TYPE,
 
85
    LINE_WIDTH,
 
86
    LINE_COLOR,
 
87
    MARKER_BUNDLE_INDEX,
 
88
    MARKER_TYPE,
 
89
    MARKER_SIZE,
 
90
    MARKER_COLOR,
 
91
    TEXT_BUNDLE_INDEX,
 
92
    TEXT_FONT_INDEX,
 
93
    TEXT_PRECISION,
 
94
    CHARACTER_EXPANSION_FACTOR,
 
95
    CHARACTER_SPACING,
 
96
    TEXT_COLOR,
 
97
    CHARACTER_HEIGHT,
 
98
    CHARACTER_ORIENTATION,
 
99
    TEXT_PATH,
 
100
    TEXT_ALIGNMENT,
 
101
    CHARACTER_SET_INDEX,
 
102
    ALTERNATE_CHARACTER_SET_INDEX,
 
103
    FILL_BUNDLE_INDEX,
 
104
    INTERIOR_STYLE,
 
105
    FILL_COLOR,
 
106
    HATCH_INDEX,
 
107
    PATTERN_INDEX,
 
108
    EDGE_BUNDLE_INDEX,
 
109
    EDGE_TYPE,
 
110
    EDGE_WIDTH,
 
111
    EDGE_COLOR,
 
112
    EDGE_VISIBILITY,
 
113
    FILL_REFERENCE_POINT,
 
114
    PATTERN_TABLE,
 
115
    PATTERN_SIZE,
 
116
    COLOR_TABLE,
 
117
    ASPECT_SOURCE_FLAGS,
 
118
    /* Class 6 */
 
119
    ESCAPE = (6 << cgm_op_class_shift) + 1,
 
120
    /* Class 7 */
 
121
    MESSAGE = (7 << cgm_op_class_shift) + 1,
 
122
    APPLICATION_DATA
 
123
} cgm_op_index;
 
124
 
 
125
/* Define the state of the CGM writer. */
 
126
                                                /*typedef struct cgm_state_s cgm_state; *//* in gdevcgml.h */
 
127
struct cgm_state_s {
 
128
    /* The following are set at initialization time. */
 
129
    FILE *file;
 
130
    cgm_allocator allocator;
 
131
    /* The following are set by specific calls. */
 
132
    cgm_metafile_elements metafile;
 
133
    cgm_picture_elements picture;
 
134
    int vdc_integer_precision;
 
135
    cgm_precision vdc_real_precision;
 
136
    cgm_color auxiliary_color;
 
137
    cgm_transparency transparency;
 
138
    cgm_point clip_rectangle[2];
 
139
    cgm_clip_indicator clip_indicator;
 
140
    int line_bundle_index;
 
141
    cgm_line_type line_type;
 
142
    cgm_line_width line_width;
 
143
    cgm_color line_color;
 
144
    int marker_bundle_index;
 
145
    cgm_marker_type marker_type;
 
146
    cgm_marker_size marker_size;
 
147
    cgm_color marker_color;
 
148
    int text_bundle_index;
 
149
    int text_font_index;
 
150
    cgm_text_precision text_precision;
 
151
    cgm_real character_expansion_factor;
 
152
    cgm_real character_spacing;
 
153
    cgm_color text_color;
 
154
    cgm_vdc character_height;
 
155
    cgm_vdc character_orientation[4];
 
156
    cgm_text_path text_path;
 
157
/****** text_alignment ******/
 
158
    int character_set_index;
 
159
    int alternate_character_set_index;
 
160
    int fill_bundle_index;
 
161
    cgm_interior_style interior_style;
 
162
    cgm_color fill_color;
 
163
    cgm_hatch_index hatch_index;
 
164
    int pattern_index;
 
165
    int edge_bundle_index;
 
166
    cgm_edge_type edge_type;
 
167
    cgm_edge_width edge_width;
 
168
    bool edge_visibility;
 
169
    cgm_point fill_reference_point;
 
170
/****** pattern_table ******/
 
171
    cgm_vdc pattern_size[4];
 
172
/****** color_table ******/
 
173
            byte /*cgm_aspect_source */ source_flags[18];
 
174
    /* The following change dynamically. */
 
175
#define command_max_count 400   /* (must be even) */
 
176
    byte command[command_max_count];
 
177
    int command_count;
 
178
    bool command_first;
 
179
    cgm_result result;
 
180
};
 
181
 
 
182
#endif /* gdevcgmx_INCLUDED */