144
145
/* ----- private function prototypes ----- */
147
private int opvp_startpage(gx_device *);
148
private int opvp_endpage(void);
149
private char *opvp_alloc_string(char **, const char *);
150
private char *opvp_cat_string(char **, const char *);
151
private char *opvp_adjust_num_string(char *);
152
private char **opvp_gen_dynamic_lib_name(void);
153
private char *opvp_to_utf8(char *);
148
static int opvp_startpage(gx_device *);
149
static int opvp_endpage(void);
150
static char *opvp_alloc_string(char **, const char *);
151
static char *opvp_cat_string(char **, const char *);
152
static char *opvp_adjust_num_string(char *);
153
static char **opvp_gen_dynamic_lib_name(void);
154
static char *opvp_to_utf8(char *);
154
155
#define opvp_check_in_page(pdev) \
155
156
((beginPage) || (inkjet) ? 0 \
156
157
: (*vdev_proc(pdev, beginpage))((gx_device_vector*)pdev))
157
private int opvp_get_papertable_index(gx_device *);
158
private char *opvp_get_sizestring(float, float);
159
/* not used private const char *opvp_get_papersize_region(gx_device *);*/
160
/* not used private const char *opvp_get_papersize_name(gx_device *);*/
161
/* not used private char *opvp_get_papersize_inch(gx_device *);*/
162
/* not used private const char *opvp_get_papersize(gx_device *);*/
163
private char *opvp_get_mediasize(gx_device *);
164
private char *opvp_gen_page_info(gx_device *);
165
private char *opvp_gen_doc_info(gx_device *);
166
private char *opvp_gen_job_info(gx_device *);
167
private int opvp_set_brush_color(gx_device_opvp *, gx_color_index,
158
static int opvp_get_papertable_index(gx_device *);
159
static char *opvp_get_sizestring(float, float);
160
/* not used static const char *opvp_get_papersize_region(gx_device *);*/
161
/* not used static const char *opvp_get_papersize_name(gx_device *);*/
162
/* not used static char *opvp_get_papersize_inch(gx_device *);*/
163
/* not used static const char *opvp_get_papersize(gx_device *);*/
164
static char *opvp_get_mediasize(gx_device *);
165
static char *opvp_gen_page_info(gx_device *);
166
static char *opvp_gen_doc_info(gx_device *);
167
static char *opvp_gen_job_info(gx_device *);
168
static int opvp_set_brush_color(gx_device_opvp *, gx_color_index,
169
private int opvp_draw_image(gx_device_opvp *, int,
170
static int opvp_draw_image(gx_device_opvp *, int,
170
171
int, int, int, int, int, /*const*/ byte *);
172
173
/* load/unload vector driver */
173
private int opvp_load_vector_driver(void);
174
private int opvp_unload_vector_driver(void);
175
private int prepare_open(gx_device *);
174
static int opvp_load_vector_driver(void);
175
static int opvp_unload_vector_driver(void);
176
static int prepare_open(gx_device *);
177
178
/* driver procs */
178
private int opvp_open(gx_device *);
179
private int oprp_open(gx_device *);
180
private void opvp_get_initial_matrix(gx_device *, gs_matrix *);
181
private int opvp_output_page(gx_device *, int, int);
182
private int opvp_close(gx_device *);
179
static int opvp_open(gx_device *);
180
static int oprp_open(gx_device *);
181
static void opvp_get_initial_matrix(gx_device *, gs_matrix *);
182
static int opvp_output_page(gx_device *, int, int);
183
static int opvp_close(gx_device *);
183
184
#if GS_VERSION_MAJOR >= 8
184
private gx_color_index opvp_map_rgb_color(gx_device *, gx_color_value *); /* modified for gs 8.15 */
185
static gx_color_index opvp_map_rgb_color(gx_device *, gx_color_value *); /* modified for gs 8.15 */
186
private gx_color_index opvp_map_rgb_color(gx_device *, gx_color_value,
187
static gx_color_index opvp_map_rgb_color(gx_device *, gx_color_value,
187
188
gx_color_value, gx_color_value);
189
private int opvp_map_color_rgb(gx_device *, gx_color_index, gx_color_value *);
190
private int opvp_copy_mono(gx_device *, /*const*/ byte *, int, int,
190
static int opvp_map_color_rgb(gx_device *, gx_color_index, gx_color_value *);
191
static int opvp_copy_mono(gx_device *, /*const*/ byte *, int, int,
191
192
gx_bitmap_id, int, int, int, int,
192
193
gx_color_index, gx_color_index);
193
private int opvp_copy_color(gx_device *, /*const*/ byte *, int, int,
194
static int opvp_copy_color(gx_device *, /*const*/ byte *, int, int,
194
195
gx_bitmap_id, int, int, int, int);
195
private int _get_params(gs_param_list *);
196
private int opvp_get_params(gx_device *, gs_param_list *);
197
private int oprp_get_params(gx_device *, gs_param_list *);
198
private int _put_params(gs_param_list *);
199
private int opvp_put_params(gx_device *, gs_param_list *);
200
private int oprp_put_params(gx_device *, gs_param_list *);
201
private int opvp_fill_path(gx_device *, const gs_imager_state *, gx_path *,
196
static int _get_params(gs_param_list *);
197
static int opvp_get_params(gx_device *, gs_param_list *);
198
static int oprp_get_params(gx_device *, gs_param_list *);
199
static int _put_params(gs_param_list *);
200
static int opvp_put_params(gx_device *, gs_param_list *);
201
static int oprp_put_params(gx_device *, gs_param_list *);
202
static int opvp_fill_path(gx_device *, const gs_imager_state *, gx_path *,
202
203
const gx_fill_params *, const gx_device_color *,
203
204
const gx_clip_path *);
204
private int opvp_stroke_path(gx_device *, const gs_imager_state *, gx_path *,
205
static int opvp_stroke_path(gx_device *, const gs_imager_state *, gx_path *,
205
206
const gx_stroke_params *, const gx_drawing_color *,
206
207
const gx_clip_path *);
207
private int opvp_fill_mask(gx_device *, const byte *, int, int, gx_bitmap_id,
208
static int opvp_fill_mask(gx_device *, const byte *, int, int, gx_bitmap_id,
208
209
int, int, int, int, const gx_drawing_color *,
209
210
int, gs_logical_operation_t, const gx_clip_path *);
211
212
/* vector driver procs */
212
private int opvp_beginpage(gx_device_vector *);
213
private int opvp_setlinewidth(gx_device_vector *, floatp);
214
private int opvp_setlinecap(gx_device_vector *, gs_line_cap);
215
private int opvp_setlinejoin(gx_device_vector *, gs_line_join);
216
private int opvp_setmiterlimit(gx_device_vector *, floatp);
217
private int opvp_setdash(gx_device_vector *, const float *, uint, floatp);
218
private int opvp_setflat(gx_device_vector *, floatp);
219
private int opvp_setlogop(gx_device_vector *, gs_logical_operation_t,
213
static int opvp_beginpage(gx_device_vector *);
214
static int opvp_setlinewidth(gx_device_vector *, floatp);
215
static int opvp_setlinecap(gx_device_vector *, gs_line_cap);
216
static int opvp_setlinejoin(gx_device_vector *, gs_line_join);
217
static int opvp_setmiterlimit(gx_device_vector *, floatp);
218
static int opvp_setdash(gx_device_vector *, const float *, uint, floatp);
219
static int opvp_setflat(gx_device_vector *, floatp);
220
static int opvp_setlogop(gx_device_vector *, gs_logical_operation_t,
220
221
gs_logical_operation_t);
221
222
#if GS_VERSION_MAJOR >= 8
222
private int opvp_can_handle_hl_color(gx_device_vector *, const gs_imager_state *, const gx_drawing_color *);
223
private int opvp_setfillcolor(gx_device_vector *, const gs_imager_state *, const gx_drawing_color *);
224
private int opvp_setstrokecolor(gx_device_vector *, const gs_imager_state *,const gx_drawing_color *);
223
static int opvp_can_handle_hl_color(gx_device_vector *, const gs_imager_state *, const gx_drawing_color *);
224
static int opvp_setfillcolor(gx_device_vector *, const gs_imager_state *, const gx_drawing_color *);
225
static int opvp_setstrokecolor(gx_device_vector *, const gs_imager_state *,const gx_drawing_color *);
226
private int opvp_setfillcolor(gx_device_vector *, const gx_drawing_color *);
227
private int opvp_setstrokecolor(gx_device_vector *, const gx_drawing_color *);
227
static int opvp_setfillcolor(gx_device_vector *, const gx_drawing_color *);
228
static int opvp_setstrokecolor(gx_device_vector *, const gx_drawing_color *);
229
private int opvp_vector_dopath(gx_device_vector *, const gx_path *,
230
static int opvp_vector_dopath(gx_device_vector *, const gx_path *,
230
231
gx_path_type_t, const gs_matrix *);
231
private int opvp_vector_dorect(gx_device_vector *, fixed, fixed, fixed, fixed,
232
static int opvp_vector_dorect(gx_device_vector *, fixed, fixed, fixed, fixed,
233
private int opvp_beginpath(gx_device_vector *, gx_path_type_t);
234
private int opvp_moveto(gx_device_vector *, floatp, floatp, floatp, floatp,
236
private int opvp_lineto(gx_device_vector *, floatp, floatp, floatp, floatp,
238
private int opvp_curveto(gx_device_vector *, floatp, floatp, floatp, floatp,
234
static int opvp_beginpath(gx_device_vector *, gx_path_type_t);
235
static int opvp_moveto(gx_device_vector *, floatp, floatp, floatp, floatp,
237
static int opvp_lineto(gx_device_vector *, floatp, floatp, floatp, floatp,
239
static int opvp_curveto(gx_device_vector *, floatp, floatp, floatp, floatp,
239
240
floatp, floatp, floatp, floatp, gx_path_type_t);
240
private int opvp_closepath(gx_device_vector *, floatp, floatp, floatp, floatp,
241
static int opvp_closepath(gx_device_vector *, floatp, floatp, floatp, floatp,
242
private int opvp_endpath(gx_device_vector *, gx_path_type_t);
243
static int opvp_endpath(gx_device_vector *, gx_path_type_t);
244
245
/* ----- Paper definition ----- */
245
246
OPVP_Paper paperTable[] =