0
|
1 |
|
|
2 |
translate 10 10
|
|
3 |
|
|
4 |
begin_block draw_lines
|
|
5 |
save
|
|
6 |
translate 50 50
|
|
7 |
|
|
8 |
save
|
|
9 |
setPen 0x7fff0000
|
|
10 |
drawLine 10 0 50 0
|
|
11 |
rotate 10
|
|
12 |
drawLine 10 0 50 0
|
|
13 |
rotate 10
|
|
14 |
drawLine 10 0 50 0
|
|
15 |
rotate 10
|
|
16 |
drawLine 10 0 50 0
|
|
17 |
rotate 10
|
|
18 |
drawLine 10 0 50 0
|
|
19 |
rotate 10
|
|
20 |
drawLine 10 0 50 0
|
|
21 |
rotate 10
|
|
22 |
drawLine 10 0 50 0
|
|
23 |
rotate 10
|
|
24 |
drawLine 10 0 50 0
|
|
25 |
rotate 10
|
|
26 |
drawLine 10 0 50 0
|
|
27 |
rotate 10
|
|
28 |
drawLine 10 0 50 0
|
|
29 |
rotate 10
|
|
30 |
drawLine 10 0 50 0
|
|
31 |
rotate 10
|
|
32 |
drawLine 10 0 50 0
|
|
33 |
rotate 10
|
|
34 |
drawLine 10 0 50 0
|
|
35 |
rotate 10
|
|
36 |
drawLine 10 0 50 0
|
|
37 |
rotate 10
|
|
38 |
drawLine 10 0 50 0
|
|
39 |
rotate 10
|
|
40 |
drawLine 10 0 50 0
|
|
41 |
rotate 10
|
|
42 |
drawLine 10 0 50 0
|
|
43 |
rotate 10
|
|
44 |
drawLine 10 0 50 0
|
|
45 |
rotate 10
|
|
46 |
drawLine 10 0 50 0
|
|
47 |
rotate 10
|
|
48 |
drawLine 10 0 50 0
|
|
49 |
rotate 10
|
|
50 |
drawLine 10 0 50 0
|
|
51 |
rotate 10
|
|
52 |
drawLine 10 0 50 0
|
|
53 |
rotate 10
|
|
54 |
drawLine 10 0 50 0
|
|
55 |
rotate 10
|
|
56 |
drawLine 10 0 50 0
|
|
57 |
rotate 10
|
|
58 |
drawLine 10 0 50 0
|
|
59 |
rotate 10
|
|
60 |
drawLine 10 0 50 0
|
|
61 |
rotate 10
|
|
62 |
drawLine 10 0 50 0
|
|
63 |
rotate 10
|
|
64 |
drawLine 10 0 50 0
|
|
65 |
rotate 10
|
|
66 |
drawLine 10 0 50 0
|
|
67 |
rotate 10
|
|
68 |
drawLine 10 0 50 0
|
|
69 |
rotate 10
|
|
70 |
drawLine 10 0 50 0
|
|
71 |
rotate 10
|
|
72 |
drawLine 10 0 50 0
|
|
73 |
rotate 10
|
|
74 |
drawLine 10 0 50 0
|
|
75 |
rotate 10
|
|
76 |
drawLine 10 0 50 0
|
|
77 |
rotate 10
|
|
78 |
drawLine 10 0 50 0
|
|
79 |
rotate 10
|
|
80 |
drawLine 10 0 50 0
|
|
81 |
restore
|
|
82 |
|
|
83 |
# and then draw the lines the other direction
|
|
84 |
save
|
|
85 |
setPen 0x7f0000ff
|
|
86 |
drawLine 50 0 10 0
|
|
87 |
rotate 10
|
|
88 |
drawLine 50 0 10 0
|
|
89 |
rotate 10
|
|
90 |
drawLine 50 0 10 0
|
|
91 |
rotate 10
|
|
92 |
drawLine 50 0 10 0
|
|
93 |
rotate 10
|
|
94 |
drawLine 50 0 10 0
|
|
95 |
rotate 10
|
|
96 |
drawLine 50 0 10 0
|
|
97 |
rotate 10
|
|
98 |
drawLine 50 0 10 0
|
|
99 |
rotate 10
|
|
100 |
drawLine 50 0 10 0
|
|
101 |
rotate 10
|
|
102 |
drawLine 50 0 10 0
|
|
103 |
rotate 10
|
|
104 |
drawLine 50 0 10 0
|
|
105 |
rotate 10
|
|
106 |
drawLine 50 0 10 0
|
|
107 |
rotate 10
|
|
108 |
drawLine 50 0 10 0
|
|
109 |
rotate 10
|
|
110 |
drawLine 50 0 10 0
|
|
111 |
rotate 10
|
|
112 |
drawLine 50 0 10 0
|
|
113 |
rotate 10
|
|
114 |
drawLine 50 0 10 0
|
|
115 |
rotate 10
|
|
116 |
drawLine 50 0 10 0
|
|
117 |
rotate 10
|
|
118 |
drawLine 50 0 10 0
|
|
119 |
rotate 10
|
|
120 |
drawLine 50 0 10 0
|
|
121 |
rotate 10
|
|
122 |
drawLine 50 0 10 0
|
|
123 |
rotate 10
|
|
124 |
drawLine 50 0 10 0
|
|
125 |
rotate 10
|
|
126 |
drawLine 50 0 10 0
|
|
127 |
rotate 10
|
|
128 |
drawLine 50 0 10 0
|
|
129 |
rotate 10
|
|
130 |
drawLine 50 0 10 0
|
|
131 |
rotate 10
|
|
132 |
drawLine 50 0 10 0
|
|
133 |
rotate 10
|
|
134 |
drawLine 50 0 10 0
|
|
135 |
rotate 10
|
|
136 |
drawLine 50 0 10 0
|
|
137 |
rotate 10
|
|
138 |
drawLine 50 0 10 0
|
|
139 |
rotate 10
|
|
140 |
drawLine 50 0 10 0
|
|
141 |
rotate 10
|
|
142 |
drawLine 50 0 10 0
|
|
143 |
rotate 10
|
|
144 |
drawLine 50 0 10 0
|
|
145 |
rotate 10
|
|
146 |
drawLine 50 0 10 0
|
|
147 |
rotate 10
|
|
148 |
drawLine 50 0 10 0
|
|
149 |
rotate 10
|
|
150 |
drawLine 50 0 10 0
|
|
151 |
rotate 10
|
|
152 |
drawLine 50 0 10 0
|
|
153 |
rotate 10
|
|
154 |
drawLine 50 0 10 0
|
|
155 |
rotate 10
|
|
156 |
drawLine 50 0 10 0
|
|
157 |
restore
|
|
158 |
|
|
159 |
# and now with a clip
|
|
160 |
save
|
|
161 |
setClipRect -30 -30 60 60
|
|
162 |
setPen 0x7f00ff00
|
|
163 |
drawLine 10 0 50 0
|
|
164 |
rotate 10
|
|
165 |
drawLine 10 0 50 0
|
|
166 |
rotate 10
|
|
167 |
drawLine 10 0 50 0
|
|
168 |
rotate 10
|
|
169 |
drawLine 10 0 50 0
|
|
170 |
rotate 10
|
|
171 |
drawLine 10 0 50 0
|
|
172 |
rotate 10
|
|
173 |
drawLine 10 0 50 0
|
|
174 |
rotate 10
|
|
175 |
drawLine 10 0 50 0
|
|
176 |
rotate 10
|
|
177 |
drawLine 10 0 50 0
|
|
178 |
rotate 10
|
|
179 |
drawLine 10 0 50 0
|
|
180 |
rotate 10
|
|
181 |
drawLine 10 0 50 0
|
|
182 |
rotate 10
|
|
183 |
drawLine 10 0 50 0
|
|
184 |
rotate 10
|
|
185 |
drawLine 10 0 50 0
|
|
186 |
rotate 10
|
|
187 |
drawLine 10 0 50 0
|
|
188 |
rotate 10
|
|
189 |
drawLine 10 0 50 0
|
|
190 |
rotate 10
|
|
191 |
drawLine 10 0 50 0
|
|
192 |
rotate 10
|
|
193 |
drawLine 10 0 50 0
|
|
194 |
rotate 10
|
|
195 |
drawLine 10 0 50 0
|
|
196 |
rotate 10
|
|
197 |
drawLine 10 0 50 0
|
|
198 |
rotate 10
|
|
199 |
drawLine 10 0 50 0
|
|
200 |
rotate 10
|
|
201 |
drawLine 10 0 50 0
|
|
202 |
rotate 10
|
|
203 |
drawLine 10 0 50 0
|
|
204 |
rotate 10
|
|
205 |
drawLine 10 0 50 0
|
|
206 |
rotate 10
|
|
207 |
drawLine 10 0 50 0
|
|
208 |
rotate 10
|
|
209 |
drawLine 10 0 50 0
|
|
210 |
rotate 10
|
|
211 |
drawLine 10 0 50 0
|
|
212 |
rotate 10
|
|
213 |
drawLine 10 0 50 0
|
|
214 |
rotate 10
|
|
215 |
drawLine 10 0 50 0
|
|
216 |
rotate 10
|
|
217 |
drawLine 10 0 50 0
|
|
218 |
rotate 10
|
|
219 |
drawLine 10 0 50 0
|
|
220 |
rotate 10
|
|
221 |
drawLine 10 0 50 0
|
|
222 |
rotate 10
|
|
223 |
drawLine 10 0 50 0
|
|
224 |
rotate 10
|
|
225 |
drawLine 10 0 50 0
|
|
226 |
rotate 10
|
|
227 |
drawLine 10 0 50 0
|
|
228 |
rotate 10
|
|
229 |
drawLine 10 0 50 0
|
|
230 |
rotate 10
|
|
231 |
drawLine 10 0 50 0
|
|
232 |
rotate 10
|
|
233 |
drawLine 10 0 50 0
|
|
234 |
restore
|
|
235 |
|
|
236 |
restore
|
|
237 |
end_block
|
|
238 |
|
|
239 |
save
|
|
240 |
translate 100 0
|
|
241 |
scale 2 2
|
|
242 |
repeat_block draw_lines
|
|
243 |
restore
|
|
244 |
|
|
245 |
translate 0 10
|
|
246 |
|
|
247 |
save
|
|
248 |
translate 0 200
|
|
249 |
setRenderHint Antialiasing
|
|
250 |
repeat_block draw_lines
|
|
251 |
restore
|
|
252 |
|
|
253 |
save
|
|
254 |
translate 100 200
|
|
255 |
scale 2 2
|
|
256 |
setRenderHint Antialiasing
|
|
257 |
repeat_block draw_lines
|
|
258 |
restore
|
|
259 |
|
|
260 |
translate 320 0
|
|
261 |
|
|
262 |
setPen black 0 solidline squarecap
|
|
263 |
|
|
264 |
begin_block lines
|
|
265 |
|
|
266 |
# 0 -> 45 degress
|
|
267 |
drawLine 100 100 200 90
|
|
268 |
drawLine 100 100 200 80
|
|
269 |
drawLine 100 100 200 70
|
|
270 |
drawLine 100 100 200 60
|
|
271 |
drawLine 100 100 200 50
|
|
272 |
drawLine 100 100 200 40
|
|
273 |
drawLine 100 100 200 30
|
|
274 |
drawLine 100 100 200 20
|
|
275 |
drawLine 100 100 200 10
|
|
276 |
|
|
277 |
# 45
|
|
278 |
drawLine 100 100 200 0
|
|
279 |
|
|
280 |
# 45 -> 90
|
|
281 |
drawLine 100 100 190 0
|
|
282 |
drawLine 100 100 180 0
|
|
283 |
drawLine 100 100 170 0
|
|
284 |
drawLine 100 100 160 0
|
|
285 |
drawLine 100 100 150 0
|
|
286 |
drawLine 100 100 140 0
|
|
287 |
drawLine 100 100 130 0
|
|
288 |
drawLine 100 100 120 0
|
|
289 |
drawLine 100 100 110 0
|
|
290 |
|
|
291 |
# 90
|
|
292 |
drawLine 100 100 100 0
|
|
293 |
|
|
294 |
# 90 -> 135
|
|
295 |
drawLine 100 100 90 0
|
|
296 |
drawLine 100 100 80 0
|
|
297 |
drawLine 100 100 70 0
|
|
298 |
drawLine 100 100 60 0
|
|
299 |
drawLine 100 100 50 0
|
|
300 |
drawLine 100 100 40 0
|
|
301 |
drawLine 100 100 30 0
|
|
302 |
drawLine 100 100 20 0
|
|
303 |
drawLine 100 100 10 0
|
|
304 |
|
|
305 |
# 135
|
|
306 |
drawLine 100 100 0 0
|
|
307 |
|
|
308 |
# 135 -> 180 degress
|
|
309 |
drawLine 100 100 0 10
|
|
310 |
drawLine 100 100 0 20
|
|
311 |
drawLine 100 100 0 30
|
|
312 |
drawLine 100 100 0 40
|
|
313 |
drawLine 100 100 0 50
|
|
314 |
drawLine 100 100 0 60
|
|
315 |
drawLine 100 100 0 70
|
|
316 |
drawLine 100 100 0 80
|
|
317 |
drawLine 100 100 0 90
|
|
318 |
|
|
319 |
# 180
|
|
320 |
drawLine 100 100 0 100
|
|
321 |
|
|
322 |
# 180 -> 225
|
|
323 |
drawLine 100 100 0 110
|
|
324 |
drawLine 100 100 0 120
|
|
325 |
drawLine 100 100 0 130
|
|
326 |
drawLine 100 100 0 140
|
|
327 |
drawLine 100 100 0 150
|
|
328 |
drawLine 100 100 0 160
|
|
329 |
drawLine 100 100 0 170
|
|
330 |
drawLine 100 100 0 180
|
|
331 |
drawLine 100 100 0 190
|
|
332 |
|
|
333 |
# 225
|
|
334 |
drawLine 100 100 0 200
|
|
335 |
|
|
336 |
# 225 -> 270
|
|
337 |
drawLine 100 100 10 200
|
|
338 |
drawLine 100 100 20 200
|
|
339 |
drawLine 100 100 30 200
|
|
340 |
drawLine 100 100 40 200
|
|
341 |
drawLine 100 100 50 200
|
|
342 |
drawLine 100 100 60 200
|
|
343 |
drawLine 100 100 70 200
|
|
344 |
drawLine 100 100 80 200
|
|
345 |
drawLine 100 100 90 200
|
|
346 |
|
|
347 |
# 270
|
|
348 |
drawLine 100 100 100 200
|
|
349 |
|
|
350 |
# 270 -> 315 degrees
|
|
351 |
drawLine 100 100 110 200
|
|
352 |
drawLine 100 100 120 200
|
|
353 |
drawLine 100 100 130 200
|
|
354 |
drawLine 100 100 140 200
|
|
355 |
drawLine 100 100 150 200
|
|
356 |
drawLine 100 100 160 200
|
|
357 |
drawLine 100 100 170 200
|
|
358 |
drawLine 100 100 180 200
|
|
359 |
drawLine 100 100 190 200
|
|
360 |
|
|
361 |
# 315
|
|
362 |
drawLine 100 100 200 200
|
|
363 |
|
|
364 |
# 315 -> 360 degress
|
|
365 |
drawLine 100 100 200 100
|
|
366 |
drawLine 100 100 200 110
|
|
367 |
drawLine 100 100 200 120
|
|
368 |
drawLine 100 100 200 130
|
|
369 |
drawLine 100 100 200 140
|
|
370 |
drawLine 100 100 200 150
|
|
371 |
drawLine 100 100 200 160
|
|
372 |
drawLine 100 100 200 170
|
|
373 |
drawLine 100 100 200 180
|
|
374 |
drawLine 100 100 200 190
|
|
375 |
|
|
376 |
end_block
|
|
377 |
|
|
378 |
|
|
379 |
setRenderHint Antialiasing
|
|
380 |
setPen 0x7fff0000
|
|
381 |
translate 0.5 0.5
|
|
382 |
repeat_block lines
|
|
383 |
|
|
384 |
setPen 0x000000 8
|
|
385 |
translate 20 240
|
|
386 |
drawText 0 0 "Steep slopes:"
|
|
387 |
|
|
388 |
translate 0 10
|
|
389 |
|
|
390 |
drawLine 0 0 -8 400
|
|
391 |
translate 20 0
|
|
392 |
drawLine 0 0 -7 400
|
|
393 |
translate 20 0
|
|
394 |
drawLine 0 0 -6 400
|
|
395 |
translate 20 0
|
|
396 |
drawLine 0 0 -5 400
|
|
397 |
translate 20 0
|
|
398 |
drawLine 0 0 -4 400
|
|
399 |
translate 20 0
|
|
400 |
drawLine 0 0 -3 400
|
|
401 |
translate 20 0
|
|
402 |
drawLine 0 0 -2 400
|
|
403 |
translate 20 0
|
|
404 |
drawLine 0 0 -1 400
|
|
405 |
translate 20 0
|
|
406 |
drawLine 0 0 0 400
|
|
407 |
translate 20 0
|
|
408 |
drawLine 0 0 1 400
|
|
409 |
translate 20 0
|
|
410 |
drawLine 0 0 2 400
|
|
411 |
translate 20 0
|
|
412 |
drawLine 0 0 3 400
|
|
413 |
translate 20 0
|
|
414 |
drawLine 0 0 4 400
|
|
415 |
translate 20 0
|
|
416 |
drawLine 0 0 5 400
|
|
417 |
translate 20 0
|
|
418 |
drawLine 0 0 6 400
|
|
419 |
translate 20 0
|
|
420 |
drawLine 0 0 7 400
|
|
421 |
translate 20 0
|
|
422 |
drawLine 0 0 8 400
|
|
423 |
|
|
424 |
resetMatrix
|
|
425 |
|
|
426 |
translate 20 450
|
|
427 |
|
|
428 |
drawText 0 0 "Zero length lines:"
|
|
429 |
|
|
430 |
translate 0 20
|
|
431 |
drawText 100 10 "Square cap"
|
|
432 |
save
|
|
433 |
begin_block points
|
|
434 |
setPen 0x000000 1 solidline squarecap
|
|
435 |
drawLine 0 0 0 0
|
|
436 |
setPen 0x000000 2 solidline squarecap
|
|
437 |
drawLine 8 0 8 0
|
|
438 |
setPen 0x000000 3 solidline squarecap
|
|
439 |
drawLine 16 0 16 0
|
|
440 |
setPen 0x000000 4 solidline squarecap
|
|
441 |
drawLine 24 0 24 0
|
|
442 |
setPen 0x000000 5 solidline squarecap
|
|
443 |
drawLine 32 0 32 0
|
|
444 |
setPen 0x000000 6 solidline squarecap
|
|
445 |
drawLine 40 0 40 0
|
|
446 |
setPen 0x000000 7 solidline squarecap
|
|
447 |
drawLine 48 0 48 0
|
|
448 |
setPen 0x000000 8 solidline squarecap
|
|
449 |
drawLine 57 0 57 0
|
|
450 |
setPen 0x000000 9 solidline squarecap
|
|
451 |
drawLine 67 0 67 0
|
|
452 |
setPen 0x000000 10 solidline squarecap
|
|
453 |
drawLine 78 0 78 0
|
|
454 |
end_block points
|
|
455 |
restore
|
|
456 |
|
|
457 |
translate 0 12
|
|
458 |
setRenderHint Antialiasing off
|
|
459 |
repeat_block points
|
|
460 |
setRenderHint Antialiasing
|
|
461 |
|
|
462 |
translate 0 20
|
|
463 |
drawText 100 10 "Round cap"
|
|
464 |
save
|
|
465 |
begin_block points2
|
|
466 |
setPen 0x000000 1 solidline roundcap
|
|
467 |
drawLine 0 0 0 0
|
|
468 |
setPen 0x000000 2 solidline roundcap
|
|
469 |
drawLine 8 0 8 0
|
|
470 |
setPen 0x000000 3 solidline roundcap
|
|
471 |
drawLine 16 0 16 0
|
|
472 |
setPen 0x000000 4 solidline roundcap
|
|
473 |
drawLine 24 0 24 0
|
|
474 |
setPen 0x000000 5 solidline roundcap
|
|
475 |
drawLine 32 0 32 0
|
|
476 |
setPen 0x000000 6 solidline roundcap
|
|
477 |
drawLine 40 0 40 0
|
|
478 |
setPen 0x000000 7 solidline roundcap
|
|
479 |
drawLine 48 0 48 0
|
|
480 |
setPen 0x000000 8 solidline roundcap
|
|
481 |
drawLine 57 0 57 0
|
|
482 |
setPen 0x000000 9 solidline roundcap
|
|
483 |
drawLine 67 0 67 0
|
|
484 |
setPen 0x000000 10 solidline roundcap
|
|
485 |
drawLine 78 0 78 0
|
|
486 |
end_block points2
|
|
487 |
restore
|
|
488 |
|
|
489 |
translate 0 12
|
|
490 |
setRenderHint Antialiasing off
|
|
491 |
repeat_block points2
|
|
492 |
setRenderHint Antialiasing
|
|
493 |
|
|
494 |
translate 0 20
|
|
495 |
drawText 100 10 "Flat cap"
|
|
496 |
save
|
|
497 |
begin_block points3
|
|
498 |
setPen 0x000000 1 solidline flatcap
|
|
499 |
drawLine 0 0 0 0
|
|
500 |
setPen 0x000000 2 solidline flatcap
|
|
501 |
drawLine 8 0 8 0
|
|
502 |
setPen 0x000000 3 solidline flatcap
|
|
503 |
drawLine 16 0 16 0
|
|
504 |
setPen 0x000000 4 solidline flatcap
|
|
505 |
drawLine 24 0 24 0
|
|
506 |
setPen 0x000000 5 solidline flatcap
|
|
507 |
drawLine 32 0 32 0
|
|
508 |
setPen 0x000000 6 solidline flatcap
|
|
509 |
drawLine 40 0 40 0
|
|
510 |
setPen 0x000000 7 solidline flatcap
|
|
511 |
drawLine 48 0 48 0
|
|
512 |
setPen 0x000000 8 solidline flatcap
|
|
513 |
drawLine 57 0 57 0
|
|
514 |
setPen 0x000000 9 solidline flatcap
|
|
515 |
drawLine 67 0 67 0
|
|
516 |
setPen 0x000000 10 solidline flatcap
|
|
517 |
drawLine 78 0 78 0
|
|
518 |
end_block points3
|
|
519 |
restore
|
|
520 |
|
|
521 |
translate 0 12
|
|
522 |
setRenderHint Antialiasing off
|
|
523 |
repeat_block points3
|
|
524 |
|
|
525 |
resetMatrix
|
|
526 |
translate -220 667.226
|
|
527 |
drawText 230 -80 "Task 194266 (should see only one line):"
|
|
528 |
setPen black
|
|
529 |
drawRect 230.5 -70.5 122 12
|
|
530 |
setRenderHint Antialiasing
|
|
531 |
setPen red
|
|
532 |
drawLine 236.842105263 -63.775117299 247.368421053 -63.775437504
|
|
533 |
|
|
534 |
setRenderHint Antialiasing off
|
|
535 |
resetMatrix
|
|
536 |
translate 10 640
|
|
537 |
setPen black
|
|
538 |
drawText 0 -10 "Task 207147 (should see two lines):"
|
|
539 |
drawRect 0.5 0.5 64 64
|
|
540 |
setRenderHint Antialiasing
|
|
541 |
setPen red
|
|
542 |
|
|
543 |
drawLine 4.5 4.5 4.5001 60.5
|
|
544 |
drawLine 4.5 4.5 60.5 4.5001
|
|
545 |
|
|
546 |
setRenderHint Antialiasing off
|
|
547 |
resetMatrix
|
|
548 |
translate 10 730
|
|
549 |
setPen black
|
|
550 |
drawText 0 -10 "Task 229459 (should see one diagonal line):"
|
|
551 |
drawRect 0.5 0.5 64 64
|
|
552 |
setPen red 2 solidline flatcap
|
|
553 |
|
|
554 |
setClipRect 2 2 63 63
|
|
555 |
drawLine 1.5 1.5 33560000 33560000
|