Debian Codegraph @

tests/auto/other/lancelot/scripts/images2.qps

raw
1 # Version: 1
2 # CheckVsReference: 5%
3
4 image_load dome_argb32.png the_image
5 begin_block draw_stuff
6
7 save
8 # standard draw
9 drawImage the_image 0 0
10
11 # flip x
12 translate 220 0
13 scale -1 1
14 drawImage the_image 0 0
15 scale -1 1
16
17 # flip y
18 translate 20 100
19 scale 1 -1
20 drawImage the_image 0 0
21 scale 1 -1
22
23 # flip x and y
24 translate 220 0
25 scale -1 -1
26 drawImage the_image 0 0
27 scale -1 -1
28
29 # flip y and scale
30 translate 20 10
31 save
32 scale 1 -1.1
33 drawImage the_image 0 0
34 restore
35
36 # flip y and scale
37 translate 220 -110
38 save
39 scale -1.1 0.9
40 drawImage the_image 0 0
41 restore
42 restore
43 end_block
44
45 setRenderHint Antialiasing
46
47 resetMatrix
48 translate 0 120
49 repeat_block draw_stuff
50
51 resetMatrix
52 translate 720 60
53 setPen black
54 drawText 0 0 "aliased"
55 translate 0 120
56 drawText 0 0 "antialiased"
57 resetMatrix
58 translate 0 260
59 drawText 0 0 "normal"
60 translate 120 0
61 drawText 0 0 "flip x"
62 translate 120 0
63 drawText 0 0 "flip y"
64 translate 120 0
65 drawText 0 0 "flip x and y"
66 translate 120 0
67 drawText 0 0 "flip y and scale"
68 translate 120 0
69 drawText 0 0 "flip x and scale"
70 translate 120 0
71
72 setRenderHint SmoothPixmapTransform
73
74 resetMatrix
75 translate 20 300
76 drawImage border.png 0 0 100 100 1 1 8 8
77 drawText 0 -5 "subrect color bleeding"
78 translate 0 120
79 drawImage border.png 0 0 100 100 0 0 10 10
80
81 image_load sign.png the_image
82 resetMatrix
83 drawText 240 300 "drawImage() with varying sx/sy offsets"
84 translate 0 10
85 drawRect 240 300 50 50
86 drawImage the_image 240 300 50 50 20 0 80 80
87 drawRect 300 300 50 50
88 drawImage the_image 300 300 50 50 -20 0 80 80
89 drawRect 240 370 50 50
90 drawImage the_image 240 370 50 50 0 20 80 80
91 drawRect 300 370 50 50
92 drawImage the_image 300 370 50 50 0 -20 80 80
93
94 pixmap_load sign.png the_pixmap
95 translate 220 0
96 translate 0 -10
97 drawText 240 300 "drawPixmap() with varying sx/sy offsets"
98 translate 0 10
99 drawRect 240 300 50 50
100 drawPixmap the_pixmap 240 300 50 50 20 0 80 80
101 drawRect 300 300 50 50
102 drawPixmap the_pixmap 300 300 50 50 -20 0 80 80
103 drawRect 240 370 50 50
104 drawPixmap the_pixmap 240 370 50 50 0 20 80 80
105 drawRect 300 370 50 50
106 drawPixmap the_pixmap 300 370 50 50 0 -20 80 80
107
108
109 resetMatrix
110 translate 0 170
111 drawText 240 300 "drawImage() with varying sx/sy offsets"
112 translate 0 10
113 drawRect 240 300 50 50
114 drawImage the_image 240 300 50 50 50 0 50 50
115 drawRect 300 300 50 50
116 drawImage the_image 300 300 50 50 -20 0 50 50
117 drawRect 240 370 50 50
118 drawImage the_image 240 370 50 50 0 50 50 50
119 drawRect 300 370 50 50
120 drawImage the_image 300 370 50 50 0 -20 50 50
121
122 resetMatrix
123 translate 220 170
124 drawText 240 300 "drawPixmap() with varying sx/sy offsets"
125 translate 0 10
126 drawRect 240 300 50 50
127 drawPixmap the_pixmap 240 300 50 50 50 0 50 50
128 drawRect 300 300 50 50
129 drawPixmap the_pixmap 300 300 50 50 -20 0 50 50
130 drawRect 240 370 50 50
131 drawPixmap the_pixmap 240 370 50 50 0 50 50 50
132 drawRect 300 370 50 50
133 drawPixmap the_pixmap 300 370 50 50 0 -20 50 50
134
135 resetMatrix
136 drawText 10 620 "drawImage/Pixmap() with negative x/y and sx/sy"
137 setPen red
138
139 translate 20 640
140 drawImage the_image -10 -10 -1 -1 -10 -10 0 0
141 drawRect 0 0 80 80
142
143 translate 100 0
144 drawPixmap the_pixmap -10 -10 -1 -1 -10 -10 0 0
145 drawRect 0 0 80 80