~ubuntu-branches/ubuntu/hardy/ghostscript/hardy

« back to all changes in this revision

Viewing changes to contrib/opvp/gdevopvp.c

  • Committer: Bazaar Package Importer
  • Author(s): Till Kamppeter
  • Date: 2007-11-22 12:17:43 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20071122121743-cd70s3ypq0r243mp
Tags: 8.61.dfsg.1-0ubtuntu1
* New upstream release
  o Final 8.61 release
* debian/patches/09_ijs_krgb_support.dpatch: Adapted to upstream changes.
* debian/rules: Updated CUPS-related variables for "make install" calls.
* debian/rules: Remove /usr/include/ghostscript from the ghostscript
  package, they go into lings-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
/* gdevopvp.c  ver.1.00 rel.1.0     26 Nov 2004 */
21
21
/* OpenPrinting Vector Printer Driver Glue Code */
22
22
 
 
23
#include        "std.h"
23
24
#include        <stdio.h>
24
25
#include        <stdlib.h>
25
26
#include        <unistd.h>
144
145
/* ----- private function prototypes ----- */
145
146
 
146
147
/* Utilities */
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,
168
169
                                 OPVP_Brush *);
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 *);
171
172
 
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 *);
176
177
 
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 */
185
186
#else
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);
188
189
#endif
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 *);
210
211
 
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 *);
225
226
#else
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 *);
228
229
#endif
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,
232
233
                               gx_path_type_t);
233
 
private int opvp_beginpath(gx_device_vector *, gx_path_type_t);
234
 
private int opvp_moveto(gx_device_vector *, floatp, floatp, floatp, floatp,
235
 
                        gx_path_type_t);
236
 
private int opvp_lineto(gx_device_vector *, floatp, floatp, floatp, floatp,
237
 
                        gx_path_type_t);
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,
 
236
                        gx_path_type_t);
 
237
static  int opvp_lineto(gx_device_vector *, floatp, floatp, floatp, floatp,
 
238
                        gx_path_type_t);
 
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,
241
242
                           gx_path_type_t);
242
 
private int opvp_endpath(gx_device_vector *, gx_path_type_t);
 
243
static  int opvp_endpath(gx_device_vector *, gx_path_type_t);
243
244
 
244
245
/* ----- Paper definition ----- */
245
246
OPVP_Paper      paperTable[] =
265
266
/* ----- Driver definition ----- */
266
267
 
267
268
/* Driver procedures */
268
 
private dev_proc_open_device(opvp_open);
269
 
private dev_proc_open_device(oprp_open);
270
 
private dev_proc_output_page(opvp_output_page);
271
 
private dev_proc_print_page(oprp_print_page);
272
 
private dev_proc_close_device(opvp_close);
273
 
private dev_proc_get_params(opvp_get_params);
274
 
private dev_proc_get_params(oprp_get_params);
275
 
private dev_proc_put_params(opvp_put_params);
276
 
private dev_proc_put_params(oprp_put_params);
277
 
private dev_proc_fill_rectangle(opvp_fill_rectangle);
278
 
private dev_proc_begin_image(opvp_begin_image);
279
 
private image_enum_proc_plane_data(opvp_image_plane_data);
280
 
private image_enum_proc_end_image(opvp_image_end_image);
 
269
static  dev_proc_open_device(opvp_open);
 
270
static  dev_proc_open_device(oprp_open);
 
271
static  dev_proc_output_page(opvp_output_page);
 
272
static  dev_proc_print_page(oprp_print_page);
 
273
static  dev_proc_close_device(opvp_close);
 
274
static  dev_proc_get_params(opvp_get_params);
 
275
static  dev_proc_get_params(oprp_get_params);
 
276
static  dev_proc_put_params(opvp_put_params);
 
277
static  dev_proc_put_params(oprp_put_params);
 
278
static  dev_proc_fill_rectangle(opvp_fill_rectangle);
 
279
static  dev_proc_begin_image(opvp_begin_image);
 
280
static  image_enum_proc_plane_data(opvp_image_plane_data);
 
281
static  image_enum_proc_end_image(opvp_image_end_image);
281
282
 
282
283
gs_public_st_suffix_add0_final(
283
284
        st_device_opvp,
357
358
}
358
359
 
359
360
/* vector procs */
360
 
private gx_device_vector_procs  opvp_vector_procs =
 
361
static  gx_device_vector_procs  opvp_vector_procs =
361
362
{
362
363
        /* Page management */
363
364
        opvp_beginpage,
408
409
};
409
410
 
410
411
/* for inkjet */
411
 
private gx_device_procs         prn_oprp_procs =
 
412
static  gx_device_procs         prn_oprp_procs =
412
413
        prn_color_params_procs(
413
414
                oprp_open,
414
415
                opvp_output_page,
460
461
static  bool                    beginPage = false;
461
462
 
462
463
/* for image */
463
 
private const
 
464
static  const
464
465
gx_image_enum_procs_t   opvp_image_enum_procs =
465
466
{
466
467
        opvp_image_plane_data,
499
500
 
500
501
 
501
502
/* ----- Utilities ----- */
502
 
private int
 
503
static  int
503
504
opvp_startpage(
504
505
        gx_device               *dev
505
506
        )
525
526
        return ecode;
526
527
}
527
528
 
528
 
private int
 
529
static  int
529
530
opvp_endpage(
530
531
        void
531
532
        )
545
546
        return ecode;
546
547
}
547
548
 
548
 
private char *
 
549
static  char *
549
550
opvp_alloc_string(
550
551
        char                    **destin,
551
552
const   char                    *source
574
575
        return *destin;
575
576
}
576
577
 
577
 
private char *
 
578
static  char *
578
579
opvp_cat_string(
579
580
        char                    **destin,
580
581
const   char                    *string
591
592
        return *destin;
592
593
}
593
594
 
594
 
private char *
 
595
static  char *
595
596
opvp_adjust_num_string(
596
597
        char                    *num_string
597
598
        )
615
616
        return num_string;
616
617
}
617
618
 
618
 
private char **
 
619
static  char **
619
620
opvp_gen_dynamic_lib_name(
620
621
        void
621
622
        )
652
653
        return buff;
653
654
}
654
655
 
655
 
private char *
 
656
static  char *
656
657
opvp_to_utf8(
657
658
        char                    *string
658
659
        )
705
706
        return ostring;
706
707
}
707
708
 
708
 
private float
 
709
static float
709
710
opvp_fabsf(float f)
710
711
{
711
712
        return (float)fabs((double)f);
712
713
}
713
714
 
714
 
private int
 
715
static  int
715
716
opvp_get_papertable_index(
716
717
        gx_device               *pdev
717
718
        )
846
847
        return paper;
847
848
}
848
849
 
849
 
private char *
 
850
static  char *
850
851
opvp_get_sizestring(
851
852
        float                   width,
852
853
        float                   height
871
872
}
872
873
 
873
874
/* not used
874
 
private const   char *
 
875
static  const   char *
875
876
opvp_get_papersize_region(
876
877
        gx_device               *pdev
877
878
        )
881
882
*/
882
883
 
883
884
/* not used
884
 
private const   char *
 
885
static  const   char *
885
886
opvp_get_papersize_name(
886
887
        gx_device               *pdev
887
888
        )
891
892
*/
892
893
 
893
894
/* not used
894
 
private char *
 
895
static  char *
895
896
opvp_get_papersize_inch(
896
897
        gx_device               *pdev
897
898
        )
908
909
*/
909
910
 
910
911
/* not used
911
 
private const   char *
 
912
static  const   char *
912
913
opvp_get_papersize(
913
914
        gx_device               *pdev
914
915
        )
922
923
}
923
924
*/
924
925
 
925
 
private char *
 
926
static  char *
926
927
opvp_get_mediasize(
927
928
        gx_device               *pdev
928
929
        )
974
975
        return buff;
975
976
}
976
977
 
977
 
private char *
 
978
static  char *
978
979
opvp_gen_page_info(
979
980
        gx_device               *dev
980
981
        )
1008
1009
        return buff;
1009
1010
}
1010
1011
 
1011
 
private char *
 
1012
static  char *
1012
1013
opvp_gen_doc_info(
1013
1014
        gx_device               *dev
1014
1015
        )
1016
1017
        return opvp_gen_page_info(dev);
1017
1018
}
1018
1019
 
1019
 
private char *
 
1020
static  char *
1020
1021
opvp_gen_job_info(
1021
1022
        gx_device               *dev
1022
1023
        )
1024
1025
        return opvp_gen_doc_info(dev);
1025
1026
}
1026
1027
 
1027
 
private int
 
1028
static  int
1028
1029
opvp_set_brush_color(
1029
1030
        gx_device_opvp          *pdev,
1030
1031
        gx_color_index          color,
1061
1062
        return ecode;
1062
1063
}
1063
1064
 
1064
 
private int
 
1065
static  int
1065
1066
opvp_draw_image(
1066
1067
        gx_device_opvp          *pdev,
1067
1068
        int                     depth,
1137
1138
/*
1138
1139
 * load vector-driver
1139
1140
 */
1140
 
private int
 
1141
static  int
1141
1142
opvp_load_vector_driver(
1142
1143
        void
1143
1144
        )
1181
1182
/*
1182
1183
 * unload vector-driver
1183
1184
 */
1184
 
private int
 
1185
static  int
1185
1186
opvp_unload_vector_driver(
1186
1187
        void
1187
1188
        )
1198
1199
/*
1199
1200
 * prepare open
1200
1201
 */
1201
 
private int
 
1202
static  int
1202
1203
prepare_open(
1203
1204
        gx_device               *dev
1204
1205
        )
1327
1328
/*
1328
1329
 * open device
1329
1330
 */
1330
 
private int
 
1331
static  int
1331
1332
opvp_open(
1332
1333
        gx_device               *dev
1333
1334
        )
1547
1548
/*
1548
1549
 * open device for inkjet
1549
1550
 */
1550
 
private int
 
1551
static  int
1551
1552
oprp_open(
1552
1553
        gx_device               *dev
1553
1554
        )
1564
1565
/*
1565
1566
 * get initial matrix
1566
1567
 */
1567
 
private void
 
1568
static  void
1568
1569
opvp_get_initial_matrix(
1569
1570
        gx_device               *dev,
1570
1571
        gs_matrix               *pmat
1608
1609
/*
1609
1610
 * output page
1610
1611
 */
1611
 
private int
 
1612
static  int
1612
1613
opvp_output_page(
1613
1614
        gx_device               *dev,
1614
1615
        int                     num_copies,
1650
1651
/*
1651
1652
 * print page
1652
1653
 */
1653
 
private int
 
1654
static  int
1654
1655
oprp_print_page(
1655
1656
        gx_device_printer       *pdev,
1656
1657
        FILE                    *prn_stream
1779
1780
/*
1780
1781
 * close device
1781
1782
 */
1782
 
private int
 
1783
static  int
1783
1784
opvp_close(
1784
1785
        gx_device               *dev
1785
1786
        )
1825
1826
 * map rgb color
1826
1827
 */
1827
1828
#if GS_VERSION_MAJOR >= 8
1828
 
private gx_color_index
 
1829
static  gx_color_index
1829
1830
opvp_map_rgb_color(
1830
1831
        gx_device               *dev,
1831
1832
        gx_color_value  *prgb           /* modified for gs 8.15 */
1832
1833
        )
1833
1834
#else
1834
 
private gx_color_index
 
1835
static  gx_color_index
1835
1836
opvp_map_rgb_color(
1836
1837
        gx_device               *dev,
1837
1838
        gx_color_value          r,
1944
1945
/*
1945
1946
 * map color rgb
1946
1947
 */
1947
 
private int
 
1948
static  int
1948
1949
opvp_map_color_rgb(
1949
1950
        gx_device               *dev,
1950
1951
        gx_color_index          color,
2030
2031
/*
2031
2032
 * fill rectangle
2032
2033
 */
2033
 
private int
 
2034
static  int
2034
2035
opvp_fill_rectangle(
2035
2036
        gx_device               *dev,
2036
2037
        int                     x,
2131
2132
/*
2132
2133
 * copy mono
2133
2134
 */
2134
 
private int
 
2135
static  int
2135
2136
opvp_copy_mono(
2136
2137
        gx_device               *dev,
2137
2138
/*const*/
2324
2325
/*
2325
2326
 * copy color
2326
2327
 */
2327
 
private int
 
2328
static  int
2328
2329
opvp_copy_color(
2329
2330
        gx_device               *dev,
2330
2331
/*const*/
2446
2447
/*
2447
2448
 * get params
2448
2449
 */
2449
 
private int
 
2450
static  int
2450
2451
_get_params(
2451
2452
        gs_param_list           *plist
2452
2453
        )
2575
2576
/*
2576
2577
 * get params for vector
2577
2578
 */
2578
 
private int
 
2579
static  int
2579
2580
opvp_get_params(
2580
2581
        gx_device               *dev,
2581
2582
        gs_param_list           *plist
2594
2595
/*
2595
2596
 * get params for inkjet
2596
2597
 */
2597
 
private int
 
2598
static  int
2598
2599
oprp_get_params(
2599
2600
        gx_device               *dev,
2600
2601
        gs_param_list           *plist
2613
2614
/*
2614
2615
 * put params
2615
2616
 */
2616
 
private int
 
2617
static  int
2617
2618
_put_params(
2618
2619
        gs_param_list           *plist
2619
2620
        )
2833
2834
/*
2834
2835
 * put params for vector
2835
2836
 */
2836
 
private int
 
2837
static  int
2837
2838
opvp_put_params(
2838
2839
        gx_device               *dev,
2839
2840
        gs_param_list           *plist
2852
2853
/*
2853
2854
 * put params for inkjet
2854
2855
 */
2855
 
private int
 
2856
static  int
2856
2857
oprp_put_params(
2857
2858
        gx_device               *dev,
2858
2859
        gs_param_list           *plist
2871
2872
/*
2872
2873
 * fill path
2873
2874
 */
2874
 
private int
 
2875
static  int
2875
2876
opvp_fill_path(
2876
2877
        gx_device               *dev,
2877
2878
const   gs_imager_state         *pis,
2908
2909
/*
2909
2910
 * stroke path
2910
2911
 */
2911
 
private int
 
2912
static  int
2912
2913
opvp_stroke_path(
2913
2914
        gx_device               *dev,
2914
2915
const   gs_imager_state         *pis,
2946
2947
/*
2947
2948
 * fill mask
2948
2949
 */
2949
 
private int
 
2950
static  int
2950
2951
opvp_fill_mask(
2951
2952
        gx_device               *dev,
2952
2953
const   byte                    *data,
2980
2981
/*
2981
2982
 * begin image
2982
2983
 */
2983
 
private int
 
2984
static  int
2984
2985
opvp_begin_image(
2985
2986
                gx_device                               *dev,
2986
2987
const   gs_imager_state                 *pis,
3269
3270
/*
3270
3271
 * plane data
3271
3272
 */
3272
 
private int
 
3273
static  int
3273
3274
opvp_image_plane_data(
3274
3275
                gx_image_enum_common_t  *info,
3275
3276
const   gx_image_plane_t                *planes,
3482
3483
/*
3483
3484
 * end image
3484
3485
 */
3485
 
private int
 
3486
static  int
3486
3487
opvp_image_end_image(
3487
3488
        gx_image_enum_common_t  *info,
3488
3489
        bool                                    draw_last
3537
3538
/*
3538
3539
 * begin page
3539
3540
 */
3540
 
private int
 
3541
static  int
3541
3542
opvp_beginpage(
3542
3543
        gx_device_vector        *vdev
3543
3544
        )
3564
3565
/*
3565
3566
 * set line width
3566
3567
 */
3567
 
private int
 
3568
static  int
3568
3569
opvp_setlinewidth(
3569
3570
        gx_device_vector        *vdev,
3570
3571
        floatp                  width
3596
3597
/*
3597
3598
 * set line cap
3598
3599
 */
3599
 
private int
 
3600
static  int
3600
3601
opvp_setlinecap(
3601
3602
        gx_device_vector        *vdev,
3602
3603
        gs_line_cap             cap
3639
3640
/*
3640
3641
 * set line join
3641
3642
 */
3642
 
private int
 
3643
static  int
3643
3644
opvp_setlinejoin(
3644
3645
        gx_device_vector        *vdev,
3645
3646
        gs_line_join            join
3683
3684
/*
3684
3685
 * set miter limit
3685
3686
 */
3686
 
private int
 
3687
static  int
3687
3688
opvp_setmiterlimit(
3688
3689
        gx_device_vector        *vdev,
3689
3690
        floatp                  limit
3711
3712
/*
3712
3713
 * set dash
3713
3714
 */
3714
 
private int
 
3715
static  int
3715
3716
opvp_setdash(
3716
3717
        gx_device_vector        *vdev,
3717
3718
        const   float           *pattern,
3780
3781
/*
3781
3782
 * set flat
3782
3783
 */
3783
 
private int
 
3784
static  int
3784
3785
opvp_setflat(
3785
3786
        gx_device_vector        *vdev,
3786
3787
        floatp                  flatness
3801
3802
/*
3802
3803
 * set logical operation
3803
3804
 */
3804
 
private int
 
3805
static  int
3805
3806
opvp_setlogop(
3806
3807
        gx_device_vector        *vdev,
3807
3808
        gs_logical_operation_t  lop,
3883
3884
 
3884
3885
#if GS_VERSION_MAJOR >= 8
3885
3886
/*--- added for Ghostscritp 8.15 ---*/
3886
 
private int
 
3887
static int
3887
3888
opvp_can_handle_hl_color(gx_device_vector * vdev, const gs_imager_state * pis1, 
3888
3889
              const gx_drawing_color * pdc)
3889
3890
{
3895
3896
 * set fill color
3896
3897
 */
3897
3898
#if GS_VERSION_MAJOR >= 8
3898
 
private int
 
3899
static  int
3899
3900
opvp_setfillcolor(
3900
3901
        gx_device_vector        *vdev,
3901
3902
        const   gs_imager_state         *pis,           /* added for gs 8.15 */
3902
3903
const   gx_drawing_color        *pdc
3903
3904
        )
3904
3905
#else
3905
 
private int
 
3906
static  int
3906
3907
opvp_setfillcolor(
3907
3908
        gx_device_vector        *vdev,
3908
3909
const   gx_drawing_color        *pdc
3939
3940
 * set stroke color
3940
3941
 */
3941
3942
#if GS_VERSION_MAJOR >= 8
3942
 
private int
 
3943
static  int
3943
3944
opvp_setstrokecolor(
3944
3945
        gx_device_vector        *vdev,
3945
3946
        const   gs_imager_state         *pis,           /* added for gs 8.15 */
3946
3947
const   gx_drawing_color        *pdc
3947
3948
        )
3948
3949
#else
3949
 
private int
 
3950
static  int
3950
3951
opvp_setstrokecolor(
3951
3952
        gx_device_vector        *vdev,
3952
3953
const   gx_drawing_color        *pdc
3983
3984
/*
3984
3985
 * vector do path
3985
3986
 */
3986
 
private int
 
3987
static  int
3987
3988
opvp_vector_dopath(
3988
3989
        gx_device_vector        *vdev,
3989
3990
const   gx_path                 *ppath,
4288
4289
/*
4289
4290
 * vector do rect
4290
4291
 */
4291
 
private int
 
4292
static  int
4292
4293
opvp_vector_dorect(
4293
4294
        gx_device_vector        *vdev,
4294
4295
        fixed                   x0,
4351
4352
/*
4352
4353
 * begin path
4353
4354
 */
4354
 
private int
 
4355
static  int
4355
4356
opvp_beginpath(
4356
4357
        gx_device_vector        *vdev,
4357
4358
        gx_path_type_t          type
4385
4386
/*
4386
4387
 * move to
4387
4388
 */
4388
 
private int
 
4389
static  int
4389
4390
opvp_moveto(
4390
4391
        gx_device_vector        *vdev,
4391
4392
        floatp                  x0,
4418
4419
/*
4419
4420
 * line to
4420
4421
 */
4421
 
private int
 
4422
static  int
4422
4423
opvp_lineto(
4423
4424
        gx_device_vector        *vdev,
4424
4425
        floatp                  x0,
4453
4454
/*
4454
4455
 * curve to
4455
4456
 */
4456
 
private int
 
4457
static  int
4457
4458
opvp_curveto(
4458
4459
        gx_device_vector        *vdev,
4459
4460
        floatp                  x0,
4509
4510
/*
4510
4511
 * close path
4511
4512
 */
4512
 
private int
 
4513
static  int
4513
4514
opvp_closepath(
4514
4515
        gx_device_vector        *vdev,
4515
4516
        floatp                  x,
4544
4545
/*
4545
4546
 * end path
4546
4547
 */
4547
 
private int
 
4548
static  int
4548
4549
opvp_endpath(
4549
4550
        gx_device_vector        *vdev,
4550
4551
        gx_path_type_t          type