@@ -68,9 +68,9 @@ page.draw { context in
68
68
drawLine ( in: context, x: 60 , y: 680 ,
69
69
label: " pattern == [3], phase == 1: 2 on, 3 off, 3 on... " )
70
70
71
- context. dashStyle = DashStyle ( pattern: [ 3 , 7 ] , phase: 2 ) !
71
+ context. dashStyle = DashStyle ( pattern: [ 7 , 3 ] , phase: 2 ) !
72
72
drawLine ( in: context, x: 60 , y: 650 ,
73
- label: " pattern == [7, 3], phase == 2: 5 on 3 off, 7 on,... " )
73
+ label: " pattern == [7, 3], phase == 2: 5 on, 3 off, 7 on,... " )
74
74
75
75
context. dashStyle = DashStyle ( pattern: [ 8 , 7 , 2 , 7 ] ) !
76
76
drawLine ( in: context, x: 60 , y: 620 ,
@@ -144,9 +144,24 @@ page.draw { context in
144
144
145
145
let fillStrokeRectangle = constructRect ( in: context, x: 300 , y: 670 , label: " Fill and Stroke " )
146
146
context. fill ( fillStrokeRectangle, stroke: true )
147
+ }
148
+
149
+ // Clip Rectangle
150
+ page. draw { context in
151
+
152
+ context. lineWidth = 2
153
+ context. strokeColor = #colorLiteral( red: 0 , green: 0 , blue: 0 , alpha: 1 )
154
+ context. fillColor = #colorLiteral( red: 0.7529411765 , green: 0 , blue: 0 , alpha: 1 )
147
155
148
156
let clipRectangle = constructRect ( in: context, x: 300 , y: 620 , label: " Clip Rectangle " )
149
157
context. stroke ( clipRectangle)
158
+
159
+ context. fontSize = 13
160
+ context. textLeading = 12
161
+ context. show ( text: " Clip Clip Clip Clip Clip Clipi Clip Clip Clip \n " +
162
+ " Clip Clip Clip Clip Clip Clipi Clip Clip Clip \n " +
163
+ " Clip Clip Clip Clip Clip Clipi Clip Clip Clip " ,
164
+ atX: 290 , y: 600 )
150
165
}
151
166
152
167
page. draw { context in
0 commit comments