|
1 # Hurra! Force line endings (?) |
|
2 |
|
3 translate 5 25 |
|
4 setFont "arial" 8 |
|
5 |
|
6 save |
|
7 drawText 15 0 "opaque image" |
|
8 translate 50 50 |
|
9 save |
|
10 translate 1 1 |
|
11 scale 20 20 |
|
12 drawImage solid2x2.png 0 0 |
|
13 restore |
|
14 save |
|
15 translate -1 1 |
|
16 scale -20 20 |
|
17 drawImage solid2x2.png 0 0 |
|
18 restore |
|
19 save |
|
20 translate 1 -1 |
|
21 scale 20 -20 |
|
22 drawImage solid2x2.png 0 0 |
|
23 restore |
|
24 save |
|
25 translate -1 -1 |
|
26 scale -20 -20 |
|
27 drawImage solid2x2.png 0 0 |
|
28 restore |
|
29 |
|
30 |
|
31 restore |
|
32 |
|
33 save |
|
34 translate 150 0 |
|
35 drawText 15 0 "alpha image" |
|
36 translate 50 50 |
|
37 save |
|
38 translate 1 1 |
|
39 scale 20 20 |
|
40 drawImage alpha2x2.png 0 0 |
|
41 restore |
|
42 save |
|
43 translate -1 1 |
|
44 scale -20 20 |
|
45 drawImage alpha2x2.png 0 0 |
|
46 restore |
|
47 save |
|
48 translate 1 -1 |
|
49 scale 20 -20 |
|
50 drawImage alpha2x2.png 0 0 |
|
51 restore |
|
52 save |
|
53 translate -1 -1 |
|
54 scale -20 -20 |
|
55 drawImage alpha2x2.png 0 0 |
|
56 restore |
|
57 restore |
|
58 |
|
59 |
|
60 save |
|
61 translate 0 150 |
|
62 drawText 15 0 "solid pixmap" |
|
63 translate 50 50 |
|
64 save |
|
65 translate 1 1 |
|
66 scale 20 20 |
|
67 drawPixmap solid2x2.png 0 0 |
|
68 restore |
|
69 save |
|
70 translate -1 1 |
|
71 scale -20 20 |
|
72 drawPixmap solid2x2.png 0 0 |
|
73 restore |
|
74 save |
|
75 translate 1 -1 |
|
76 scale 20 -20 |
|
77 drawPixmap solid2x2.png 0 0 |
|
78 restore |
|
79 save |
|
80 translate -1 -1 |
|
81 scale -20 -20 |
|
82 drawPixmap solid2x2.png 0 0 |
|
83 restore |
|
84 restore |
|
85 |
|
86 |
|
87 save |
|
88 translate 150 150 |
|
89 drawText 15 0 "alpha pixmap" |
|
90 translate 50 50 |
|
91 save |
|
92 translate 1 1 |
|
93 scale 20 20 |
|
94 drawPixmap alpha2x2.png 0 0 |
|
95 restore |
|
96 save |
|
97 translate -1 1 |
|
98 scale -20 20 |
|
99 drawPixmap alpha2x2.png 0 0 |
|
100 restore |
|
101 save |
|
102 translate 1 -1 |
|
103 scale 20 -20 |
|
104 drawPixmap alpha2x2.png 0 0 |
|
105 restore |
|
106 save |
|
107 translate -1 -1 |
|
108 scale -20 -20 |
|
109 drawPixmap alpha2x2.png 0 0 |
|
110 restore |
|
111 restore |
|
112 |
|
113 |
|
114 save |
|
115 translate 300 10 |
|
116 save |
|
117 drawText 0 -10 "subrect solid image" |
|
118 drawImage solid2x2.png 0 0 50 5 0 0.0 2 0.2 |
|
119 drawImage solid2x2.png 0 5 50 5 0 0.2 2 0.2 |
|
120 drawImage solid2x2.png 0 10 50 5 0 0.4 2 0.2 |
|
121 drawImage solid2x2.png 0 15 50 5 0 0.6 2 0.2 |
|
122 drawImage solid2x2.png 0 20 50 5 0 0.8 2 0.2 |
|
123 drawImage solid2x2.png 0 25 50 5 0 1.0 2 0.2 |
|
124 drawImage solid2x2.png 0 30 50 5 0 1.2 2 0.2 |
|
125 drawImage solid2x2.png 0 35 50 5 0 1.4 2 0.2 |
|
126 drawImage solid2x2.png 0 40 50 5 0 1.6 2 0.2 |
|
127 drawImage solid2x2.png 0 45 50 5 0 1.8 2 0.2 |
|
128 translate 60 0 |
|
129 drawImage solid2x2.png 0 0 5 50 0.0 0 0.2 2 |
|
130 drawImage solid2x2.png 5 0 5 50 0.2 0 0.2 2 |
|
131 drawImage solid2x2.png 10 0 5 50 0.4 0 0.2 2 |
|
132 drawImage solid2x2.png 15 0 5 50 0.6 0 0.2 2 |
|
133 drawImage solid2x2.png 20 0 5 50 0.8 0 0.2 2 |
|
134 drawImage solid2x2.png 25 0 5 50 1.0 0 0.2 2 |
|
135 drawImage solid2x2.png 30 0 5 50 1.2 0 0.2 2 |
|
136 drawImage solid2x2.png 35 0 5 50 1.4 0 0.2 2 |
|
137 drawImage solid2x2.png 40 0 5 50 1.6 0 0.2 2 |
|
138 drawImage solid2x2.png 45 0 5 50 1.8 0 0.2 2 |
|
139 restore |
|
140 |
|
141 save |
|
142 translate 150 0 |
|
143 drawText 0 -10 "subrect solid image" |
|
144 drawImage alpha2x2.png 0 0 50 5 0 0.0 2 0.2 |
|
145 drawImage alpha2x2.png 0 5 50 5 0 0.2 2 0.2 |
|
146 drawImage alpha2x2.png 0 10 50 5 0 0.4 2 0.2 |
|
147 drawImage alpha2x2.png 0 15 50 5 0 0.6 2 0.2 |
|
148 drawImage alpha2x2.png 0 20 50 5 0 0.8 2 0.2 |
|
149 drawImage alpha2x2.png 0 25 50 5 0 1.0 2 0.2 |
|
150 drawImage alpha2x2.png 0 30 50 5 0 1.2 2 0.2 |
|
151 drawImage alpha2x2.png 0 35 50 5 0 1.4 2 0.2 |
|
152 drawImage alpha2x2.png 0 40 50 5 0 1.6 2 0.2 |
|
153 drawImage alpha2x2.png 0 45 50 5 0 1.8 2 0.2 |
|
154 translate 60 0 |
|
155 drawImage alpha2x2.png 0 0 5 50 0.0 0 0.2 2 |
|
156 drawImage alpha2x2.png 5 0 5 50 0.2 0 0.2 2 |
|
157 drawImage alpha2x2.png 10 0 5 50 0.4 0 0.2 2 |
|
158 drawImage alpha2x2.png 15 0 5 50 0.6 0 0.2 2 |
|
159 drawImage alpha2x2.png 20 0 5 50 0.8 0 0.2 2 |
|
160 drawImage alpha2x2.png 25 0 5 50 1.0 0 0.2 2 |
|
161 drawImage alpha2x2.png 30 0 5 50 1.2 0 0.2 2 |
|
162 drawImage alpha2x2.png 35 0 5 50 1.4 0 0.2 2 |
|
163 drawImage alpha2x2.png 40 0 5 50 1.6 0 0.2 2 |
|
164 drawImage alpha2x2.png 45 0 5 50 1.8 0 0.2 2 |
|
165 restore |
|
166 |
|
167 save |
|
168 translate 0 100 |
|
169 drawText 0 -10 "subrect alpha pixmap" |
|
170 drawPixmap solid2x2.png 0 0 50 5 0 0.0 2 0.2 |
|
171 drawPixmap solid2x2.png 0 5 50 5 0 0.2 2 0.2 |
|
172 drawPixmap solid2x2.png 0 10 50 5 0 0.4 2 0.2 |
|
173 drawPixmap solid2x2.png 0 15 50 5 0 0.6 2 0.2 |
|
174 drawPixmap solid2x2.png 0 20 50 5 0 0.8 2 0.2 |
|
175 drawPixmap solid2x2.png 0 25 50 5 0 1.0 2 0.2 |
|
176 drawPixmap solid2x2.png 0 30 50 5 0 1.2 2 0.2 |
|
177 drawPixmap solid2x2.png 0 35 50 5 0 1.4 2 0.2 |
|
178 drawPixmap solid2x2.png 0 40 50 5 0 1.6 2 0.2 |
|
179 drawPixmap solid2x2.png 0 45 50 5 0 1.8 2 0.2 |
|
180 translate 60 0 |
|
181 drawPixmap solid2x2.png 0 0 5 50 0.0 0 0.2 2 |
|
182 drawPixmap solid2x2.png 5 0 5 50 0.2 0 0.2 2 |
|
183 drawPixmap solid2x2.png 10 0 5 50 0.4 0 0.2 2 |
|
184 drawPixmap solid2x2.png 15 0 5 50 0.6 0 0.2 2 |
|
185 drawPixmap solid2x2.png 20 0 5 50 0.8 0 0.2 2 |
|
186 drawPixmap solid2x2.png 25 0 5 50 1.0 0 0.2 2 |
|
187 drawPixmap solid2x2.png 30 0 5 50 1.2 0 0.2 2 |
|
188 drawPixmap solid2x2.png 35 0 5 50 1.4 0 0.2 2 |
|
189 drawPixmap solid2x2.png 40 0 5 50 1.6 0 0.2 2 |
|
190 drawPixmap solid2x2.png 45 0 5 50 1.8 0 0.2 2 |
|
191 restore |
|
192 |
|
193 save |
|
194 translate 150 100 |
|
195 drawText 0 -10 "subrect alpha pixmap" |
|
196 drawPixmap alpha2x2.png 0 0 50 5 0 0.0 2 0.2 |
|
197 drawPixmap alpha2x2.png 0 5 50 5 0 0.2 2 0.2 |
|
198 drawPixmap alpha2x2.png 0 10 50 5 0 0.4 2 0.2 |
|
199 drawPixmap alpha2x2.png 0 15 50 5 0 0.6 2 0.2 |
|
200 drawPixmap alpha2x2.png 0 20 50 5 0 0.8 2 0.2 |
|
201 drawPixmap alpha2x2.png 0 25 50 5 0 1.0 2 0.2 |
|
202 drawPixmap alpha2x2.png 0 30 50 5 0 1.2 2 0.2 |
|
203 drawPixmap alpha2x2.png 0 35 50 5 0 1.4 2 0.2 |
|
204 drawPixmap alpha2x2.png 0 40 50 5 0 1.6 2 0.2 |
|
205 drawPixmap alpha2x2.png 0 45 50 5 0 1.8 2 0.2 |
|
206 translate 60 0 |
|
207 drawPixmap alpha2x2.png 0 0 5 50 0.0 0 0.2 2 |
|
208 drawPixmap alpha2x2.png 5 0 5 50 0.2 0 0.2 2 |
|
209 drawPixmap alpha2x2.png 10 0 5 50 0.4 0 0.2 2 |
|
210 drawPixmap alpha2x2.png 15 0 5 50 0.6 0 0.2 2 |
|
211 drawPixmap alpha2x2.png 20 0 5 50 0.8 0 0.2 2 |
|
212 drawPixmap alpha2x2.png 25 0 5 50 1.0 0 0.2 2 |
|
213 drawPixmap alpha2x2.png 30 0 5 50 1.2 0 0.2 2 |
|
214 drawPixmap alpha2x2.png 35 0 5 50 1.4 0 0.2 2 |
|
215 drawPixmap alpha2x2.png 40 0 5 50 1.6 0 0.2 2 |
|
216 drawPixmap alpha2x2.png 45 0 5 50 1.8 0 0.2 2 |
|
217 restore |
|
218 |
|
219 restore |
|
220 |
|
221 |
|
222 |
|
223 image_load alpha2x2.png alpha2x2 |
|
224 image_convertToFormat alpha2x2 alpha2x2_argb32 ARGB32 |
|
225 image_convertToFormat alpha2x2 alpha2x2_argb32pre ARGB32_Premultiplied |
|
226 image_convertToFormat alpha2x2 alpha2x2_rgb888 Format_RGB888 |
|
227 image_convertToFormat alpha2x2 alpha2x2_rgb32 RGB32 |
|
228 image_convertToFormat alpha2x2 alpha2x2_rgb16 Format_RGB16 |
|
229 |
|
230 save |
|
231 translate 0 300 |
|
232 drawText 15 0 "drawImage - argb32" |
|
233 translate 50 50 |
|
234 save |
|
235 translate 0.5 0.5 |
|
236 scale 20 20 |
|
237 drawImage alpha2x2_argb32 0 0 |
|
238 restore |
|
239 save |
|
240 translate -0.5 0.5 |
|
241 scale -20 20 |
|
242 drawImage alpha2x2_argb32 0 0 |
|
243 restore |
|
244 save |
|
245 translate 0.5 -0.5 |
|
246 scale 20 -20 |
|
247 drawImage alpha2x2_argb32 0 0 |
|
248 restore |
|
249 save |
|
250 translate -0.5 -0.5 |
|
251 scale -20 -20 |
|
252 drawImage alpha2x2_argb32 0 0 |
|
253 restore |
|
254 restore |
|
255 |
|
256 save |
|
257 translate 150 300 |
|
258 drawText 15 0 "drawImage - argb32premul" |
|
259 translate 50 50 |
|
260 save |
|
261 translate 0.5 0.5 |
|
262 scale 20 20 |
|
263 drawImage alpha2x2_argb32pre 0 0 |
|
264 restore |
|
265 save |
|
266 translate -0.5 0.5 |
|
267 scale -20 20 |
|
268 drawImage alpha2x2_argb32pre 0 0 |
|
269 restore |
|
270 save |
|
271 translate 0.5 -0.5 |
|
272 scale 20 -20 |
|
273 drawImage alpha2x2_argb32pre 0 0 |
|
274 restore |
|
275 save |
|
276 translate -0.5 -0.5 |
|
277 scale -20 -20 |
|
278 drawImage alpha2x2_argb32pre 0 0 |
|
279 restore |
|
280 restore |
|
281 |
|
282 |
|
283 |
|
284 save |
|
285 translate 0 450 |
|
286 drawText 15 0 "drawImage - rgb888" |
|
287 translate 50 50 |
|
288 save |
|
289 translate 0.5 0.5 |
|
290 scale 20 20 |
|
291 drawImage alpha2x2_rgb888 0 0 |
|
292 restore |
|
293 save |
|
294 translate -0.5 0.5 |
|
295 scale -20 20 |
|
296 drawImage alpha2x2_rgb888 0 0 |
|
297 restore |
|
298 save |
|
299 translate 0.5 -0.5 |
|
300 scale 20 -20 |
|
301 drawImage alpha2x2_rgb888 0 0 |
|
302 restore |
|
303 save |
|
304 translate -0.5 -0.5 |
|
305 scale -20 -20 |
|
306 drawImage alpha2x2_rgb888 0 0 |
|
307 restore |
|
308 restore |
|
309 |
|
310 save |
|
311 translate 150 450 |
|
312 drawText 15 0 "drawImage - rgb32" |
|
313 translate 50 50 |
|
314 save |
|
315 translate 0.5 0.5 |
|
316 scale 20 20 |
|
317 drawImage alpha2x2_rgb32 0 0 |
|
318 restore |
|
319 save |
|
320 translate -0.5 0.5 |
|
321 scale -20 20 |
|
322 drawImage alpha2x2_rgb32 0 0 |
|
323 restore |
|
324 save |
|
325 translate 0.5 -0.5 |
|
326 scale 20 -20 |
|
327 drawImage alpha2x2_rgb32 0 0 |
|
328 restore |
|
329 save |
|
330 translate -0.5 -0.5 |
|
331 scale -20 -20 |
|
332 drawImage alpha2x2_rgb32 0 0 |
|
333 restore |
|
334 restore |
|
335 |
|
336 save |
|
337 translate 300 450 |
|
338 drawText 15 0 "drawImage - rgb16" |
|
339 translate 50 50 |
|
340 save |
|
341 translate 0.5 0.5 |
|
342 scale 20 20 |
|
343 drawImage alpha2x2_rgb16 0 0 |
|
344 restore |
|
345 save |
|
346 translate -0.5 0.5 |
|
347 scale -20 20 |
|
348 drawImage alpha2x2_rgb16 0 0 |
|
349 restore |
|
350 save |
|
351 translate 0.5 -0.5 |
|
352 scale 20 -20 |
|
353 drawImage alpha2x2_rgb16 0 0 |
|
354 restore |
|
355 save |
|
356 translate -0.5 -0.5 |
|
357 scale -20 -20 |
|
358 drawImage alpha2x2_rgb16 0 0 |
|
359 restore |
|
360 restore |
|
361 |
|
362 |
|
363 |
|
364 save |
|
365 translate 0 600 |
|
366 drawText 15 0 "clipping - argb32" |
|
367 translate 50 50 |
|
368 setClipRect -30 -30 60 60 ReplaceClip |
|
369 save |
|
370 translate 0.5 0.5 |
|
371 scale 20 20 |
|
372 drawImage alpha2x2_argb32 0 0 |
|
373 restore |
|
374 save |
|
375 translate -0.5 0.5 |
|
376 scale -20 20 |
|
377 drawImage alpha2x2_argb32 0 0 |
|
378 restore |
|
379 save |
|
380 translate 0.5 -0.5 |
|
381 scale 20 -20 |
|
382 drawImage alpha2x2_argb32 0 0 |
|
383 restore |
|
384 save |
|
385 translate -0.5 -0.5 |
|
386 scale -20 -20 |
|
387 drawImage alpha2x2_argb32 0 0 |
|
388 restore |
|
389 restore |
|
390 |
|
391 save |
|
392 translate 150 600 |
|
393 drawText 15 0 "clipping - argb32premul" |
|
394 translate 50 50 |
|
395 setClipRect -30 -30 60 60 ReplaceClip |
|
396 save |
|
397 translate 0.5 0.5 |
|
398 scale 20 20 |
|
399 drawImage alpha2x2_argb32pre 0 0 |
|
400 restore |
|
401 save |
|
402 translate -0.5 0.5 |
|
403 scale -20 20 |
|
404 drawImage alpha2x2_argb32pre 0 0 |
|
405 restore |
|
406 save |
|
407 translate 0.5 -0.5 |
|
408 scale 20 -20 |
|
409 drawImage alpha2x2_argb32pre 0 0 |
|
410 restore |
|
411 save |
|
412 translate -0.5 -0.5 |
|
413 scale -20 -20 |
|
414 drawImage alpha2x2_argb32pre 0 0 |
|
415 restore |
|
416 restore |
|
417 |
|
418 save |
|
419 translate 300 600 |
|
420 drawText 15 0 "clipping - rgb16" |
|
421 translate 50 50 |
|
422 setClipRect -30 -30 60 60 ReplaceClip |
|
423 save |
|
424 translate 0.5 0.5 |
|
425 scale 20 20 |
|
426 drawImage alpha2x2_rgb16 0 0 |
|
427 restore |
|
428 save |
|
429 translate -0.5 0.5 |
|
430 scale -20 20 |
|
431 drawImage alpha2x2_rgb16 0 0 |
|
432 restore |
|
433 save |
|
434 translate 0.5 -0.5 |
|
435 scale 20 -20 |
|
436 drawImage alpha2x2_rgb16 0 0 |
|
437 restore |
|
438 save |
|
439 translate -0.5 -0.5 |
|
440 scale -20 -20 |
|
441 drawImage alpha2x2_rgb16 0 0 |
|
442 restore |
|
443 restore |
|
444 |
|
445 |
|
446 path_addEllipse ellipse -30 -30 60 60 |
|
447 |
|
448 save |
|
449 translate 0 750 |
|
450 drawText 15 0 "clipping - argb32" |
|
451 translate 50 50 |
|
452 setClipPath ellipse ReplaceClip |
|
453 save |
|
454 translate 0.5 0.5 |
|
455 scale 20 20 |
|
456 drawImage alpha2x2_argb32 0 0 |
|
457 restore |
|
458 save |
|
459 translate -0.5 0.5 |
|
460 scale -20 20 |
|
461 drawImage alpha2x2_argb32 0 0 |
|
462 restore |
|
463 save |
|
464 translate 0.5 -0.5 |
|
465 scale 20 -20 |
|
466 drawImage alpha2x2_argb32 0 0 |
|
467 restore |
|
468 save |
|
469 translate -0.5 -0.5 |
|
470 scale -20 -20 |
|
471 drawImage alpha2x2_argb32 0 0 |
|
472 restore |
|
473 restore |
|
474 |
|
475 save |
|
476 translate 150 750 |
|
477 drawText 15 0 "clipping - argb32premul" |
|
478 translate 50 50 |
|
479 setClipPath ellipse ReplaceClip |
|
480 save |
|
481 translate 0.5 0.5 |
|
482 scale 20 20 |
|
483 drawImage alpha2x2_argb32pre 0 0 |
|
484 restore |
|
485 save |
|
486 translate -0.5 0.5 |
|
487 scale -20 20 |
|
488 drawImage alpha2x2_argb32pre 0 0 |
|
489 restore |
|
490 save |
|
491 translate 0.5 -0.5 |
|
492 scale 20 -20 |
|
493 drawImage alpha2x2_argb32pre 0 0 |
|
494 restore |
|
495 save |
|
496 translate -0.5 -0.5 |
|
497 scale -20 -20 |
|
498 drawImage alpha2x2_argb32pre 0 0 |
|
499 restore |
|
500 restore |
|
501 |
|
502 save |
|
503 translate 300 750 |
|
504 drawText 15 0 "clipping - rgb16" |
|
505 translate 50 50 |
|
506 setClipPath ellipse ReplaceClip |
|
507 save |
|
508 translate 0.5 0.5 |
|
509 scale 20 20 |
|
510 drawImage alpha2x2_rgb16 0 0 |
|
511 restore |
|
512 save |
|
513 translate -0.5 0.5 |
|
514 scale -20 20 |
|
515 drawImage alpha2x2_rgb16 0 0 |
|
516 restore |
|
517 save |
|
518 translate 0.5 -0.5 |
|
519 scale 20 -20 |
|
520 drawImage alpha2x2_rgb16 0 0 |
|
521 restore |
|
522 save |
|
523 translate -0.5 -0.5 |
|
524 scale -20 -20 |
|
525 drawImage alpha2x2_rgb16 0 0 |
|
526 restore |
|
527 restore |