3 classvar font, fillColor, strokeColor;
10 str.prDrawAtPoint( Point( 0, 0 ), font ? SCFont.default, fillColor ? Color.black );
13 *stringAtPoint { arg str, point;
14 str.prDrawAtPoint( point, font ? SCFont.default, fillColor ? Color.black );
17 *stringInRect { arg str, rect;
18 str.prDrawInRect( rect, font ? SCFont.default, fillColor ? Color.black );
21 *stringCenteredIn { arg str, inRect;
22 var f = font ? SCFont.default;
23 str.prDrawAtPoint(str.bounds( f ).centerIn(inRect), f, fillColor ? Color.black); }
25 *stringLeftJustIn { arg str, inRect;
27 f = font ? SCFont.default;
28 bounds = str.prBounds( Rect.new, f );
29 pos = bounds.centerIn(inRect);
30 pos.x = inRect.left + 2;
31 str.prDrawAtPoint(pos, f, fillColor ? Color.black);
34 *stringRightJustIn { arg str, inRect;
36 f = font ? SCFont.default;
37 bounds = str.prBounds( Rect.new, f );
38 pos = bounds.centerIn(inRect);
39 pos.x = inRect.right - 2 - bounds.width;
40 str.prDrawAtPoint(pos, f, fillColor ? Color.black);
44 img.drawAtPoint( Point( 0, 0 ), img.bounds );
47 *imageAtPoint { arg img, point;
48 img.drawAtPoint( point, img.bounds );
51 *strokeColor_ { arg color;
53 color.cocoaPrSetStroke;
56 *fillColor_ { arg color;
62 color = color ? Color.black;
65 color.cocoaPrSetStroke.cocoaPrSetFill;
81 *translate { arg x=0, y=0;
86 *scale { arg x=0, y=0;
96 *rotate { arg angle=0, x=0, y=0;
101 *width_ { arg width = 1;
103 ^this.primitiveFailed
107 *path { arg function;
110 res = function.value;
117 ^this.primitiveFailed
122 ^this.primitiveFailed
127 ^this.primitiveFailed
131 ^this.moveTo(p1).lineTo(p2);
134 *addArc { arg center, radius, startAngle, arcAngle;
136 ^this.primitiveFailed
139 *addWedge { arg center, radius, startAngle, arcAngle;
141 ^this.primitiveFailed
144 *addAnnularWedge { arg center, innerRadius, outerRadius, startAngle, arcAngle;
146 ^this.primitiveFailed
151 ^this.primitiveFailed
156 ^this.primitiveFailed
161 ^this.primitiveFailed
166 ^this.primitiveFailed
168 *matrix_ { arg array;
170 ^this.primitiveFailed
173 *strokeRect { arg rect;
175 ^this.primitiveFailed
178 *fillRect { arg rect;
180 ^this.primitiveFailed
183 *strokeOval { arg rect;
185 ^this.primitiveFailed
188 *fillOval { arg rect;
190 ^this.primitiveFailed
193 *drawAquaButton { arg rect, type=0, down = false, on = false;
195 ^this.primitiveFailed
198 *setSmoothing { arg flag = true;
199 this.deprecated(thisMethod, Meta_SCPen.findRespondingMethodFor(\smoothing_));
200 this.smoothing = flag;
203 *smoothing_ { arg flag = true;
205 ^this.primitiveFailed
214 *clearRect {arg aRect=nil;
216 ^this.primitiveFailed
219 *arcTo { arg point1, point2, radius;
221 ^this.primitiveFailed
224 *curveTo { arg point, cpoint1, cpoint2;
226 ^this.primitiveFailed
229 *quadCurveTo { arg point, cpoint1;
231 ^this.primitiveFailed
234 *alpha_ {arg opacity;
236 ^this.primitiveFailed
240 different blend modes:
275 *blendMode_{ arg mode;
277 ^this.primitiveFailed
280 *setShadow { arg offsetPoint=Point(2,2), blur=0.5, color=Color.black;
281 this.prSetShadow(offsetPoint, blur, color);
284 *prSetShadow { arg offsetPoint, blur, color;
286 ^this.primitiveFailed
289 *beginTransparencyLayer {
291 ^this.primitiveFailed
294 *endTransparencyLayer { // will work only for Mac Os X >= 10.3 - does nothing for others
296 ^this.primitiveFailed
299 *draw { arg option = 0;// 0 = fill, 1 = eofill, 2 = stroke, 3 = fillstroke, 4 = eofillstroke
301 ^this.primitiveFailed
304 *joinStyle_ { arg style = 0; // 0 = miter, 1 = round, 2 = bevel
306 ^this.primitiveFailed
309 *capStyle_ { arg style = 0; // 0 = butt, 1 = round, 2 = square
311 ^this.primitiveFailed
314 *lineDash_ { arg pattern; // should be a FloatArray
316 ^this.primitiveFailed
321 ^this.primitiveFailed
324 *fillAxialGradient { arg startPoint, endPoint, color0, color1;
325 this.prFillAxialGradient(startPoint, endPoint, color0, color1);
328 *fillRadialGradient { arg innerCircleCenter, outerCircleCenter, startRadius,
329 endRadius, color0, color1;
330 this.prFillRadialGradient(innerCircleCenter, outerCircleCenter, startRadius,
331 endRadius, color0, color1)
334 *prFillAxialGradient { arg startPoint, endPoint, color0, color1;
335 _Pen_DrawAxialGradient
336 ^this.primitiveFailed
339 *prFillRadialGradient { arg innerCircleCenter, outerCircleCenter, startRadius,
340 endRadius, color0, color1;
341 _Pen_DrawRadialGradient
342 ^this.primitiveFailed
348 ^this.primitiveFailed
353 ^this.primitiveFailed