blob: fd9a80a5586a5e451dc5c54e1373375498dd76d8 (
plain)
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
|
path_addRect path1 10 10 50 50
path_addRect path2 30 30 50 50
# enable/disable a clip path
setPen nopen
setBrush red
setClipPath path1
setClipPath path2 UniteClip
drawRect 0 0 100 100
setClipping false
setBrush #630000ff
drawRect 0 0 100 100
setClipping true
setBrush #6300ff00
drawRect 0 0 100 100
# enable/disable noclip
translate 150 0
setClipPath path1 NoClip
setClipping false
setBrush #630000ff
drawRect 0 0 100 100
setClipping true
setBrush #6300ff00
drawRect 25 25 50 50
# enable/disable full clipping
translate 150 0
path_addRect path3 0 0 10 10
path_addRect path4 20 20 10 10
setClipPath path3
setClipPath path4 IntersectClip
setClipping false
setBrush #630000ff
drawRect 0 0 100 100
setClipping true
setBrush #6300ff00
drawRect 25 25 50 50
|