Debian Codegraph @

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

raw
1 # Version: 1
2 # CheckVsReference: 2% (0 0 600 750)
3
4 path_addRect path 400 0 80 80
5 path_addEllipse path 440 40 60 60
6
7 setRenderHint Antialiasing
8
9 setPen black
10
11 begin_block gradients
12 gradient_clearStops
13 gradient_appendStop 0 red
14 gradient_appendStop 0.25 orange
15 gradient_appendStop 0.5 yellow
16 gradient_appendStop 0.8 green
17 gradient_appendStop 1 cyan
18
19 gradient_setSpread PadSpread
20 gradient_setLinear 20 20 70 70
21 drawRect 0 0 100 100
22
23 gradient_setSpread ReflectSpread
24 gradient_setLinear 120 20 170 70
25 drawEllipse 100 0 100 100
26
27 gradient_setSpread RepeatSpread
28 gradient_setLinear 220 20 270 70
29 drawRoundRect 200 0 100 100
30
31 gradient_clearStops
32 gradient_appendStop 0 3f7f7fff
33 gradient_appendStop 0.5 dfdfffff
34 gradient_appendStop 1 7f00007f
35
36 gradient_setSpread PadSpread
37 gradient_setLinear 320 20 340 40
38 drawPolygon [300 0 390 0 350 99]
39
40 gradient_setSpread ReflectSpread
41 gradient_setLinear 420 20 440 40
42 drawPath path
43
44 gradient_setSpread RepeatSpread
45 gradient_setLinear 520 20 540 40
46 drawPie 500 0 100 100 720 4320
47 end_block
48
49 translate 0 100
50 scale 1 2
51 repeat_block gradients
52
53 resetMatrix
54 translate 0 300
55 brushTranslate 30 0
56 brushScale 0.9 0.9
57 brushRotate 20
58 repeat_block gradients
59
60 # Vertical gradient tests
61 resetMatrix
62 setBrush noBrush
63 translate 0 400
64
65 begin_block vertical_gradients
66 gradient_clearStops
67 gradient_appendStop 0 red
68 gradient_appendStop 0.25 orange
69 gradient_appendStop 0.5 yellow
70 gradient_appendStop 0.8 green
71 gradient_appendStop 1 cyan
72
73 gradient_setSpread PadSpread
74 gradient_setLinear 20 20 20 70
75 drawRect 0 0 100 100
76
77 gradient_setSpread ReflectSpread
78 gradient_setLinear 120 20 120 70
79 drawEllipse 100 0 100 100
80
81 gradient_setSpread RepeatSpread
82 gradient_setLinear 220 20 220 70
83 drawRoundRect 200 0 100 100
84
85 gradient_clearStops
86 gradient_appendStop 0 3f7f7fff
87 gradient_appendStop 0.5 dfdfffff
88 gradient_appendStop 1 7f00007f
89
90 gradient_setSpread PadSpread
91 gradient_setLinear 320 20 320 40
92 drawPolygon [300 0 390 0 350 99]
93
94 gradient_setSpread ReflectSpread
95 gradient_setLinear 420 20 420 40
96 drawPath path
97
98 gradient_setSpread RepeatSpread
99 gradient_setLinear 520 20 520 40
100 drawPie 500 0 100 100 720 4320
101 end_block
102
103 translate 0 100
104 scale 1 1.5
105 repeat_block vertical_gradients
106
107 resetMatrix
108 translate 0 650
109 brushTranslate 30 0
110 brushScale 0.9 0.9
111 brushRotate 20
112 repeat_block vertical_gradients
113
114 # Some helpful info perhaps?
115 resetMatrix
116 setPen black
117 # gradient line indicators
118 drawLine 20 20 70 70
119 drawLine 120 20 170 70
120 drawLine 220 20 270 70
121 drawLine 320 20 340 40
122 drawLine 420 20 440 40
123 drawLine 520 20 540 40
124
125 drawLine 20 140 70 240
126 drawLine 120 140 170 240
127 drawLine 220 140 270 240
128 drawLine 320 140 340 180
129 drawLine 420 140 440 180
130 drawLine 520 140 540 180
131
132 drawText 610 50 "No XForm"
133 drawText 610 200 "scale 1x2"
134 drawText 610 350 "brush transform"
135 drawText 610 450 "vertical brush"
136 drawText 610 570 "vertical brush scale 1x1.5"
137 drawText 610 700 "vertical brush transform"
138
139 drawText 10 780 "Pad"
140 drawText 110 780 "Reflect"
141 drawText 210 780 "Repeat"
142 drawText 310 780 "Pad w/alpha"
143 drawText 410 780 "Reflect w/alpha"
144 drawText 510 780 "Repeat w/alpha"