0
|
1 |
|
|
2 |
translate 0 50
|
|
3 |
|
|
4 |
surface_begin 0 0 100 100
|
|
5 |
|
|
6 |
begin_block predraw
|
|
7 |
setRenderHint Antialiasing
|
|
8 |
setPen nopen
|
|
9 |
gradient_clearStops
|
|
10 |
gradient_appendStop 0 efff0000
|
|
11 |
gradient_appendStop 0.5 dfffff00
|
|
12 |
gradient_appendStop 1 ef00ff00
|
|
13 |
|
|
14 |
gradient_setSpread PadSpread
|
|
15 |
gradient_setLinear 10 10 90 90
|
|
16 |
drawEllipse 10 10 80 80
|
|
17 |
end_block
|
|
18 |
|
|
19 |
setCompositionMode SourceOver
|
|
20 |
|
|
21 |
begin_block postdraw
|
|
22 |
|
|
23 |
gradient_clearStops
|
|
24 |
gradient_appendStop 0 afff0000
|
|
25 |
gradient_appendStop 0.5 cf0000ff
|
|
26 |
gradient_appendStop 1 bf00ff00
|
|
27 |
|
|
28 |
gradient_setSpread PadSpread
|
|
29 |
gradient_setLinear 0 0 100 0
|
|
30 |
drawEllipse 10 10 30 30
|
|
31 |
drawEllipse 10 60 30 30
|
|
32 |
drawEllipse 60 60 30 30
|
|
33 |
drawEllipse 60 10 30 30
|
|
34 |
drawEllipse 35 35 30 30
|
|
35 |
|
|
36 |
# a black rectangle around
|
|
37 |
setCompositionMode SourceOver
|
|
38 |
setPen black
|
|
39 |
setBrush nobrush
|
|
40 |
drawRect 0.5 0.5 99 99
|
|
41 |
|
|
42 |
end_block
|
|
43 |
surface_end
|
|
44 |
|
|
45 |
# Destination over
|
|
46 |
surface_begin 100 0 100 100
|
|
47 |
repeat_block predraw
|
|
48 |
setCompositionMode DestinationOver
|
|
49 |
repeat_block postdraw
|
|
50 |
surface_end
|
|
51 |
|
|
52 |
|
|
53 |
# Clear
|
|
54 |
surface_begin 200 0 100 100
|
|
55 |
repeat_block predraw
|
|
56 |
setCompositionMode Clear
|
|
57 |
repeat_block postdraw
|
|
58 |
surface_end
|
|
59 |
|
|
60 |
|
|
61 |
# Source
|
|
62 |
surface_begin 300 0 100 100
|
|
63 |
repeat_block predraw
|
|
64 |
setCompositionMode Source
|
|
65 |
repeat_block postdraw
|
|
66 |
surface_end
|
|
67 |
|
|
68 |
|
|
69 |
# Destination
|
|
70 |
surface_begin 400 0 100 100
|
|
71 |
repeat_block predraw
|
|
72 |
setCompositionMode Destination
|
|
73 |
repeat_block postdraw
|
|
74 |
surface_end
|
|
75 |
|
|
76 |
|
|
77 |
# Source In
|
|
78 |
surface_begin 500 0 100 100
|
|
79 |
repeat_block predraw
|
|
80 |
setCompositionMode SourceIn
|
|
81 |
repeat_block postdraw
|
|
82 |
surface_end
|
|
83 |
|
|
84 |
translate 0 50
|
|
85 |
|
|
86 |
# Destination In
|
|
87 |
surface_begin 0 100 100 100
|
|
88 |
repeat_block predraw
|
|
89 |
setCompositionMode DestinationIn
|
|
90 |
repeat_block postdraw
|
|
91 |
surface_end
|
|
92 |
|
|
93 |
|
|
94 |
# Source Out
|
|
95 |
surface_begin 100 100 100 100
|
|
96 |
repeat_block predraw
|
|
97 |
setCompositionMode SourceOut
|
|
98 |
repeat_block postdraw
|
|
99 |
surface_end
|
|
100 |
|
|
101 |
|
|
102 |
# Destination Out
|
|
103 |
surface_begin 200 100 100 100
|
|
104 |
repeat_block predraw
|
|
105 |
setCompositionMode DestinationOut
|
|
106 |
repeat_block postdraw
|
|
107 |
surface_end
|
|
108 |
|
|
109 |
|
|
110 |
# SourceAtop
|
|
111 |
surface_begin 300 100 100 100
|
|
112 |
repeat_block predraw
|
|
113 |
setCompositionMode SourceAtop
|
|
114 |
repeat_block postdraw
|
|
115 |
surface_end
|
|
116 |
|
|
117 |
|
|
118 |
# DestinationAtop
|
|
119 |
surface_begin 400 100 100 100
|
|
120 |
repeat_block predraw
|
|
121 |
setCompositionMode DestinationAtop
|
|
122 |
repeat_block postdraw
|
|
123 |
surface_end
|
|
124 |
|
|
125 |
|
|
126 |
# Xor
|
|
127 |
surface_begin 500 100 100 100
|
|
128 |
repeat_block predraw
|
|
129 |
setCompositionMode Xor
|
|
130 |
repeat_block postdraw
|
|
131 |
surface_end
|
|
132 |
|
|
133 |
translate 0 50
|
|
134 |
|
|
135 |
# Plus
|
|
136 |
surface_begin 0 200 100 100
|
|
137 |
repeat_block predraw
|
|
138 |
setCompositionMode Plus
|
|
139 |
repeat_block postdraw
|
|
140 |
surface_end
|
|
141 |
|
|
142 |
|
|
143 |
# Multiply
|
|
144 |
surface_begin 100 200 100 100
|
|
145 |
repeat_block predraw
|
|
146 |
setCompositionMode Multiply
|
|
147 |
repeat_block postdraw
|
|
148 |
surface_end
|
|
149 |
|
|
150 |
|
|
151 |
# Screen
|
|
152 |
surface_begin 200 200 100 100
|
|
153 |
repeat_block predraw
|
|
154 |
setCompositionMode Screen
|
|
155 |
repeat_block postdraw
|
|
156 |
surface_end
|
|
157 |
|
|
158 |
|
|
159 |
# Overlay
|
|
160 |
surface_begin 300 200 100 100
|
|
161 |
repeat_block predraw
|
|
162 |
setCompositionMode Overlay
|
|
163 |
repeat_block postdraw
|
|
164 |
surface_end
|
|
165 |
|
|
166 |
|
|
167 |
# Darken
|
|
168 |
surface_begin 400 200 100 100
|
|
169 |
repeat_block predraw
|
|
170 |
setCompositionMode Darken
|
|
171 |
repeat_block postdraw
|
|
172 |
surface_end
|
|
173 |
|
|
174 |
|
|
175 |
# Lighten
|
|
176 |
surface_begin 500 200 100 100
|
|
177 |
repeat_block predraw
|
|
178 |
setCompositionMode Lighten
|
|
179 |
repeat_block postdraw
|
|
180 |
surface_end
|
|
181 |
|
|
182 |
translate 0 50
|
|
183 |
|
|
184 |
# ColorDodge
|
|
185 |
surface_begin 0 300 100 100
|
|
186 |
repeat_block predraw
|
|
187 |
setCompositionMode ColorDodge
|
|
188 |
repeat_block postdraw
|
|
189 |
surface_end
|
|
190 |
|
|
191 |
|
|
192 |
# Multiply
|
|
193 |
surface_begin 100 300 100 100
|
|
194 |
repeat_block predraw
|
|
195 |
setCompositionMode ColorBurn
|
|
196 |
repeat_block postdraw
|
|
197 |
surface_end
|
|
198 |
|
|
199 |
|
|
200 |
# Screen
|
|
201 |
surface_begin 200 300 100 100
|
|
202 |
repeat_block predraw
|
|
203 |
setCompositionMode HardLight
|
|
204 |
repeat_block postdraw
|
|
205 |
surface_end
|
|
206 |
|
|
207 |
|
|
208 |
# Overlay
|
|
209 |
surface_begin 300 300 100 100
|
|
210 |
repeat_block predraw
|
|
211 |
setCompositionMode SoftLight
|
|
212 |
repeat_block postdraw
|
|
213 |
surface_end
|
|
214 |
|
|
215 |
|
|
216 |
# Darken
|
|
217 |
surface_begin 400 300 100 100
|
|
218 |
repeat_block predraw
|
|
219 |
setCompositionMode Difference
|
|
220 |
repeat_block postdraw
|
|
221 |
surface_end
|
|
222 |
|
|
223 |
|
|
224 |
# Lighten
|
|
225 |
surface_begin 500 300 100 100
|
|
226 |
repeat_block predraw
|
|
227 |
setCompositionMode Exclusion
|
|
228 |
repeat_block postdraw
|
|
229 |
surface_end
|
|
230 |
|
|
231 |
resetMatrix
|
|
232 |
|
|
233 |
drawText 0 50 "SourceOver"
|
|
234 |
drawText 100 50 "DestinationOver"
|
|
235 |
drawText 200 50 "Clear"
|
|
236 |
drawText 300 50 "Source"
|
|
237 |
drawText 400 50 "Destination"
|
|
238 |
drawText 500 50 "SourceIn"
|
|
239 |
drawText 0 200 "DestinationIn"
|
|
240 |
drawText 100 200 "SourceOut"
|
|
241 |
drawText 200 200 "DestinationOut"
|
|
242 |
drawText 300 200 "SourceAtop"
|
|
243 |
drawText 400 200 "DestinationAtop"
|
|
244 |
drawText 500 200 "Xor"
|
|
245 |
drawText 0 350 "Plus"
|
|
246 |
drawText 100 350 "Multiply"
|
|
247 |
drawText 200 350 "Screen"
|
|
248 |
drawText 300 350 "Overlay"
|
|
249 |
drawText 400 350 "Darken"
|
|
250 |
drawText 500 350 "Lighten"
|
|
251 |
drawText 0 500 "ColorDodge"
|
|
252 |
drawText 100 500 "ColorBurn"
|
|
253 |
drawText 200 500 "HardLight"
|
|
254 |
drawText 300 500 "SoftLight"
|
|
255 |
drawText 400 500 "Difference"
|
|
256 |
drawText 500 500 "Exclusion"
|