0
|
1 |
|
|
2 |
setRenderHint Antialiasing
|
|
3 |
|
|
4 |
setPen #00ff00
|
|
5 |
|
|
6 |
translate 10 10
|
|
7 |
# standard draw
|
|
8 |
begin_block gradient
|
|
9 |
gradient_clearStops
|
|
10 |
gradient_appendStop 0 red
|
|
11 |
gradient_appendStop 0.25 orange
|
|
12 |
gradient_appendStop 0.5 yellow
|
|
13 |
gradient_appendStop 0.8 green
|
|
14 |
gradient_appendStop 1 cyan
|
|
15 |
|
|
16 |
gradient_setSpread PadSpread
|
|
17 |
gradient_setLinear 10 10 290 290
|
|
18 |
drawRect 0 0 300 300
|
|
19 |
end_block gradient
|
|
20 |
|
|
21 |
# Rotation w/o smooth xform
|
|
22 |
save
|
|
23 |
translate 350 0
|
|
24 |
save
|
|
25 |
setRenderHint SmoothPixmapTransform on
|
|
26 |
mapQuadToQuad 0 0 0 300 300 300 300 0 0 50 0 200 300 300 300 0
|
|
27 |
repeat_block gradient
|
|
28 |
restore
|
|
29 |
restore
|
|
30 |
|
|
31 |
translate 0 320
|
|
32 |
|
|
33 |
save
|
|
34 |
setRenderHint SmoothPixmapTransform on
|
|
35 |
mapQuadToQuad 0 0 0 300 300 300 300 0 0 0 100 300 200 300 300 0
|
|
36 |
repeat_block gradient
|
|
37 |
restore
|
|
38 |
|
|
39 |
save
|
|
40 |
translate 350 0
|
|
41 |
save
|
|
42 |
setRenderHint SmoothPixmapTransform on
|
|
43 |
mapQuadToQuad 0 0 0 300 300 300 300 0 0 0 0 300 300 250 300 50
|
|
44 |
repeat_block gradient
|
|
45 |
restore
|
|
46 |
restore
|
|
47 |
|
|
48 |
|
|
49 |
resetMatrix
|
|
50 |
setPen black
|
|
51 |
translate 125 20
|
|
52 |
drawText 0 0 "No transform"
|
|
53 |
translate 350 0
|
|
54 |
drawText 0 0 "Left Tilted"
|
|
55 |
resetMatrix
|
|
56 |
translate 125 350
|
|
57 |
drawText 0 0 "Bottom Tilted"
|
|
58 |
translate 350 0
|
|
59 |
drawText 0 0 "Right Tilted"
|
|
60 |
translate 120 0
|