File: linear_gradients_perspectives.qps

package info (click to toggle)
qtbase-opensource-src 5.7.1%2Bdfsg-3%2Bdeb9u2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 283,652 kB
  • sloc: cpp: 1,754,662; ansic: 433,142; xml: 100,291; python: 9,650; sh: 7,671; java: 6,543; asm: 4,283; perl: 2,217; yacc: 1,733; lex: 1,194; makefile: 333; objc: 70
file content (62 lines) | stat: -rw-r--r-- 1,164 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Version: 1


setRenderHint Antialiasing

setPen #00ff00

translate 10 10
# standard draw
begin_block gradient
gradient_clearStops
gradient_appendStop 0    red
gradient_appendStop 0.25 orange
gradient_appendStop 0.5  yellow
gradient_appendStop 0.8  green
gradient_appendStop 1    cyan

gradient_setSpread PadSpread
gradient_setLinear 10 10 290 290
drawRect 0 0 300 300
end_block gradient

# Rotation w/o smooth xform
save
translate 350 0
save
  setRenderHint SmoothPixmapTransform on
  mapQuadToQuad 0 0 0 300 300 300 300 0   0 50 0 200 300 300 300 0
  repeat_block gradient
restore
restore

translate 0 320

save
  setRenderHint SmoothPixmapTransform on
  mapQuadToQuad 0 0 0 300 300 300 300 0   0 0 100 300 200 300 300 0
  repeat_block gradient
restore

save
translate 350 0
save
  setRenderHint SmoothPixmapTransform on
  mapQuadToQuad 0 0 0 300 300 300 300 0   0 0 0 300 300 250 300 50
  repeat_block gradient
restore
restore


resetMatrix
setPen black
translate 125 20
drawText 0 0 "No transform"
translate 350 0
drawText 0 0 "Left Tilted"
resetMatrix
translate 125 350
drawText 0 0 "Bottom Tilted"
translate 350 0
drawText 0 0 "Right Tilted"
translate 120 0