|
1 drawText -5 5 "Text that is drawn outside the bounds..." |
|
2 |
|
3 translate 20 20 |
|
4 begin_block text_drawing |
|
5 save |
|
6 setFont "sansserif" 10 normal |
|
7 drawText 0 20 "sansserif 10pt, normal" |
|
8 |
|
9 setFont "sansserif" 12 normal |
|
10 drawText 0 40 "sansserif 12pt, normal" |
|
11 |
|
12 setFont "sansserif" 10 bold |
|
13 drawText 0 60 "sansserif 12pt, bold" |
|
14 |
|
15 setFont "sansserif" 10 bold italic |
|
16 drawText 0 80 "sansserif 10pt, bold italic" |
|
17 |
|
18 |
|
19 translate 0 100 |
|
20 setPen #7fff0000 |
|
21 |
|
22 setFont "sansserif" 10 normal |
|
23 drawText 0 20 "alpha sansserif 10pt, normal" |
|
24 |
|
25 setFont "sansserif" 12 normal |
|
26 drawText 0 40 "alpha sansserif 12pt, normal" |
|
27 |
|
28 setFont "sansserif" 10 bold |
|
29 drawText 0 60 "alpha sansserif 12pt, bold" |
|
30 |
|
31 setFont "sansserif" 10 bold italic |
|
32 drawText 0 80 "alpha sansserif 10pt, bold italic" |
|
33 |
|
34 |
|
35 translate 0 100 |
|
36 setPen black |
|
37 save |
|
38 scale 0.9 0.9 |
|
39 |
|
40 setFont "sansserif" 10 normal |
|
41 drawText 0 20 "scaled sansserif 10pt, normal" |
|
42 |
|
43 setFont "sansserif" 12 normal |
|
44 drawText 0 40 "scaled sansserif 12pt, normal" |
|
45 |
|
46 setFont "sansserif" 10 bold |
|
47 drawText 0 60 "scaled sansserif 12pt, bold" |
|
48 |
|
49 setFont "sansserif" 10 bold italic |
|
50 drawText 0 80 "scaled sansserif 10pt, bold italic" |
|
51 restore |
|
52 |
|
53 translate 0 100 |
|
54 setPen black |
|
55 save |
|
56 translate 200 90 |
|
57 rotate 185 |
|
58 |
|
59 setFont "sansserif" 10 normal |
|
60 drawText 0 20 "scaled sansserif 10pt, normal" |
|
61 |
|
62 setFont "sansserif" 12 normal |
|
63 drawText 0 40 "scaled sansserif 12pt, normal" |
|
64 |
|
65 setFont "sansserif" 10 bold |
|
66 drawText 0 60 "scaled sansserif 12pt, bold" |
|
67 |
|
68 setFont "sansserif" 10 bold italic |
|
69 drawText 0 80 "scaled sansserif 10pt, bold italic" |
|
70 restore |
|
71 |
|
72 translate 0 100 |
|
73 gradient_appendStop 0 red |
|
74 gradient_appendStop 0.5 #00ff00 |
|
75 gradient_appendStop 1 blue |
|
76 gradient_setLinear 0 0 200 0 |
|
77 setPen brush |
|
78 |
|
79 setFont "sansserif" 10 normal |
|
80 drawText 0 0 "gradient sansserif 10pt, normal" |
|
81 |
|
82 setFont "sansserif" 12 normal |
|
83 drawText 0 20 "gradient sansserif 12pt, normal" |
|
84 |
|
85 setFont "sansserif" 10 bold |
|
86 drawText 0 40 "gradient sansserif 12pt, bold" |
|
87 |
|
88 setFont "sansserif" 10 bold italic |
|
89 drawText 0 60 "gradient sansserif 10pt, bold italic" |
|
90 restore |
|
91 end_block |
|
92 |
|
93 translate 250 0 |
|
94 drawText 25 520 "clipped to rectangle" |
|
95 save |
|
96 setPen #3f000000 |
|
97 setBrush nobrush |
|
98 drawRect 20 0 100 500 |
|
99 setClipRect 20 0 100 500 |
|
100 setPen black |
|
101 repeat_block text_drawing |
|
102 restore |
|
103 |
|
104 translate 150 0 |
|
105 drawText 25 520 "clipped to path" |
|
106 save |
|
107 path_moveTo clip 20 0 |
|
108 path_cubicTo clip 0 200 40 400 20 400 |
|
109 path_lineTo clip 30 500 |
|
110 path_lineTo clip 30 0 |
|
111 path_lineTo clip 40 0 |
|
112 path_lineTo clip 40 500 |
|
113 path_lineTo clip 120 500 |
|
114 path_lineTo clip 120 0 |
|
115 path_lineTo clip 20 0 |
|
116 setPen #3f000000 |
|
117 setBrush nobrush |
|
118 drawPath clip |
|
119 setClipPath clip |
|
120 setPen black |
|
121 repeat_block text_drawing |
|
122 restore |