1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
|
--- lips/gdevl4v.c.orig Thu Nov 2 12:09:18 2000
+++ lips/gdevl4v.c Tue Jan 13 01:30:38 2004
@@ -230,41 +230,66 @@
};
/* Vector device implementation */
-private int lips4v_beginpage(P1(gx_device_vector * vdev));
-private int lips4v_setfillcolor(P2(gx_device_vector * vdev,
- const gx_drawing_color * pdc));
-private int lips4v_setstrokecolor(P2(gx_device_vector * vdev,
- const gx_drawing_color * pdc));
-private int lips4v_setdash(P4(gx_device_vector * vdev, const float *pattern,
- uint count, floatp offset));
-private int lips4v_setflat(P2(gx_device_vector * vdev, floatp flatness));
+#if GS_VERSION_MAJOR >= 8
+private int lips4v_beginpage(gx_device_vector * vdev);
+private int lips4v_setfillcolor(gx_device_vector * vdev,
+ const gx_drawing_color * pdc);
+private int lips4v_setstrokecolor(gx_device_vector * vdev,
+ const gx_drawing_color * pdc);
+private int lips4v_setdash(gx_device_vector * vdev, const float *pattern,
+ uint count, floatp offset);
+private int lips4v_setflat(gx_device_vector * vdev, floatp flatness);
+private int
+lips4v_setlogop(gx_device_vector * vdev, gs_logical_operation_t lop,
+ gs_logical_operation_t diff);
private int
-lips4v_setlogop(P3
- (gx_device_vector * vdev, gs_logical_operation_t lop,
- gs_logical_operation_t diff));
+lips4v_beginpath(gx_device_vector * vdev, gx_path_type_t type);
+private int
+lips4v_moveto(gx_device_vector * vdev, floatp x0, floatp y0, floatp x,
+ floatp y, gx_path_type_t type);
private int
+lips4v_lineto(gx_device_vector * vdev, floatp x0, floatp y0, floatp x,
+ floatp y, gx_path_type_t type);
+private int
+lips4v_curveto(gx_device_vector * vdev, floatp x0, floatp y0, floatp x1,
+ floatp y1, floatp x2, floatp y2, floatp x3, floatp y3,
+ gx_path_type_t type);
+lips4v_closepath(gx_device_vector * vdev, floatp x, floatp y, floatp x_start,
+ floatp y_start, gx_path_type_t type);
-lips4v_beginpath(P2(gx_device_vector * vdev, gx_path_type_t type));
+private int lips4v_endpath(gx_device_vector * vdev, gx_path_type_t type);
+#else
+private int lips4v_beginpage(P1(gx_device_vector * vdev));
+private int lips4v_setfillcolor(gx_device_vector * vdev,
+ const gx_drawing_color * pdc);
+private int lips4v_setstrokecolor(gx_device_vector * vdev,
+ const gx_drawing_color * pdc);
+private int lips4v_setdash(gx_device_vector * vdev, const float *pattern,
+ uint count, floatp offset);
+private int lips4v_setflat(gx_device_vector * vdev, floatp flatness);
+private int
+lips4v_setlogop(gx_device_vector * vdev, gs_logical_operation_t lop,
+ gs_logical_operation_t diff);
+private int
+
+lips4v_beginpath(gx_device_vector * vdev, gx_path_type_t type);
private int
-lips4v_moveto(P6
- (gx_device_vector * vdev, floatp x0, floatp y0, floatp x,
- floatp y, gx_path_type_t type));
+lips4v_moveto(gx_device_vector * vdev, floatp x0, floatp y0, floatp x,
+ floatp y, gx_path_type_t type);
private int
-lips4v_lineto(P6
- (gx_device_vector * vdev, floatp x0, floatp y0, floatp x,
- floatp y, gx_path_type_t type));
+lips4v_lineto(gx_device_vector * vdev, floatp x0, floatp y0, floatp x,
+ floatp y, gx_path_type_t type);
private int
-lips4v_curveto(P10
- (gx_device_vector * vdev, floatp x0, floatp y0, floatp x1,
+lips4v_curveto(gx_device_vector * vdev, floatp x0, floatp y0, floatp x1,
floatp y1, floatp x2, floatp y2, floatp x3, floatp y3,
- gx_path_type_t type));
+ gx_path_type_t type);
private int
-lips4v_closepath(P6
- (gx_device_vector * vdev, floatp x, floatp y, floatp x_start,
- floatp y_start, gx_path_type_t type));
+lips4v_closepath(gx_device_vector * vdev, floatp x, floatp y, floatp x_start,
+ floatp y_start, gx_path_type_t type);
-private int lips4v_endpath(P2(gx_device_vector * vdev, gx_path_type_t type));
+private int lips4v_endpath(gx_device_vector * vdev, gx_path_type_t type);
+#endif
private int lips4v_setlinewidth(gx_device_vector * vdev, floatp width);
private int lips4v_setlinecap(gx_device_vector * vdev, gs_line_cap cap);
private int lips4v_setlinejoin(gx_device_vector * vdev, gs_line_join join);
@@ -758,10 +783,26 @@
/* 用紙サイズ */
if (pdev->prev_paper_size != paper_size) {
if (paper_size == USER_SIZE) {
- sprintf(paper, "%c80;%d;%dp", LIPS_CSI, width * 10, height * 10);
+ /* modified by shige 06/27 2003
+ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, width * 10, height * 10); */
+ /* modified by shige 11/09 2003
+ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, height * 10, width * 10); */
+ sprintf(paper, "%c80;%d;%dp", LIPS_CSI,
+ (height * 10 > LIPS_HEIGHT_MAX_720)?
+ LIPS_HEIGHT_MAX_720 : (height * 10),
+ (width * 10 > LIPS_WIDTH_MAX_720)?
+ LIPS_WIDTH_MAX_720 : (width * 10));
lputs(s, paper);
} else if (paper_size == USER_SIZE + LANDSCAPE) {
- sprintf(paper, "%c81;%d;%dp", LIPS_CSI, height * 10, width * 10);
+ /* modified by shige 06/27 2003
+ sprintf(paper, "%c81;%d;%dp", LIPS_CSI, height * 10, width * 10); */
+ /* modified by shige 11/09 2003
+ sprintf(paper, "%c81;%d;%dp", LIPS_CSI, width * 10, height * 10); */
+ sprintf(paper, "%c80;%d;%dp", LIPS_CSI,
+ (width * 10 > LIPS_HEIGHT_MAX_720)?
+ LIPS_HEIGHT_MAX_720 : (width * 10),
+ (height * 10 > LIPS_WIDTH_MAX_720)?
+ LIPS_WIDTH_MAX_720 : (height * 10));
lputs(s, paper);
} else {
sprintf(paper, "%c%dp", LIPS_CSI, paper_size);
@@ -770,12 +811,28 @@
} else if (paper_size == USER_SIZE) {
if (pdev->prev_paper_width != width ||
pdev->prev_paper_height != height)
- sprintf(paper, "%c80;%d;%dp", LIPS_CSI, width * 10, height * 10);
+ /* modified by shige 06/27 2003
+ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, width * 10, height * 10); */
+ /* modified by shige 11/09 2003
+ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, height * 10, width * 10); */
+ sprintf(paper, "%c80;%d;%dp", LIPS_CSI,
+ (height * 10 > LIPS_HEIGHT_MAX_720)?
+ LIPS_HEIGHT_MAX_720 : (height * 10),
+ (width * 10 > LIPS_WIDTH_MAX_720)?
+ LIPS_WIDTH_MAX_720 : (width * 10));
lputs(s, paper);
} else if (paper_size == USER_SIZE + LANDSCAPE) {
if (pdev->prev_paper_width != width ||
pdev->prev_paper_height != height)
- sprintf(paper, "%c81;%d;%dp", LIPS_CSI, height * 10, width * 10);
+ /* modified by shige 06/27 2003
+ sprintf(paper, "%c81;%d;%dp", LIPS_CSI, height * 10, width * 10); */
+ /* modified by shige 11/09 2003
+ sprintf(paper, "%c81;%d;%dp", LIPS_CSI, width * 10, height * 10); */
+ sprintf(paper, "%c80;%d;%dp", LIPS_CSI,
+ (width * 10 > LIPS_HEIGHT_MAX_720)?
+ LIPS_HEIGHT_MAX_720 : (width * 10),
+ (height * 10 > LIPS_WIDTH_MAX_720)?
+ LIPS_WIDTH_MAX_720 : (height * 10));
lputs(s, paper);
}
pdev->prev_paper_size = paper_size;
@@ -1881,7 +1938,7 @@
}
color_set_pure(&color, one);
code = gdev_vector_update_fill_color((gx_device_vector *) pdev,
- &color);
+ NULL, &color);
}
if (code < 0)
return 0;
@@ -2026,7 +2083,7 @@
if (w <= 0 || h <= 0)
return 0;
if (depth > 1 ||
- gdev_vector_update_fill_color(vdev, pdcolor) < 0 ||
+ gdev_vector_update_fill_color(vdev, NULL, pdcolor) < 0 ||
gdev_vector_update_clip_path(vdev, pcpath) < 0 ||
gdev_vector_update_log_op(vdev, lop) < 0)
return gx_default_fill_mask(dev, data, data_x, raster, id,
|