1
/* Copyright (C) 2001-2006 Artifex Software, Inc.
4
This software is provided AS-IS with no warranty, either express or
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.
13
/* $Id: gdevcgmx.h 8022 2007-06-05 22:23:38Z giles $ */
14
/* Internal definitions for CGM-writing library */
16
#ifndef gdevcgmx_INCLUDED
17
# define gdevcgmx_INCLUDED
21
/* Define the internal representations of the CGM opcodes. */
22
#define cgm_op_class_shift 7
23
#define cgm_op_id_shift 5
26
BEGIN_METAFILE = (0 << cgm_op_class_shift) + 1,
32
METAFILE_VERSION = (1 << cgm_op_class_shift) + 1,
39
COLOR_INDEX_PRECISION,
42
METAFILE_ELEMENT_LIST,
43
METAFILE_DEFAULTS_REPLACEMENT,
46
CHARACTER_CODING_ANNOUNCER,
48
SCALING_MODE = (2 << cgm_op_class_shift) + 1,
50
LINE_WIDTH_SPECIFICATION_MODE,
51
MARKER_SIZE_SPECIFICATION_MODE,
52
EDGE_WIDTH_SPECIFICATION_MODE,
56
VDC_INTEGER_PRECISION = (3 << cgm_op_class_shift) + 1,
63
POLYLINE = (4 << cgm_op_class_shift) + 1,
72
GENERALIZED_DRAWING_PRIMITIVE,
76
CIRCULAR_ARC_3_POINT_CLOSE,
78
CIRCULAR_ARC_CENTER_CLOSE,
83
LINE_BUNDLE_INDEX = (5 << cgm_op_class_shift) + 1,
94
CHARACTER_EXPANSION_FACTOR,
98
CHARACTER_ORIENTATION,
102
ALTERNATE_CHARACTER_SET_INDEX,
113
FILL_REFERENCE_POINT,
119
ESCAPE = (6 << cgm_op_class_shift) + 1,
121
MESSAGE = (7 << cgm_op_class_shift) + 1,
125
/* Define the state of the CGM writer. */
126
/*typedef struct cgm_state_s cgm_state; *//* in gdevcgml.h */
128
/* The following are set at initialization time. */
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;
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;
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];
182
#endif /* gdevcgmx_INCLUDED */