3 *implementsClass {^'Pen'}
4 //-------------------------- Global state control ------------------------------
13 ^this.primitiveFailed;
22 //-------------------------- Drawing state -------------------------------------
24 *fillColor_ { arg aColor;
26 ^this.primitiveFailed;
29 *strokeColor_ { arg aColor;
31 ^this.primitiveFailed;
35 this.fillColor_( aColor );
36 this.strokeColor_( aColor );
41 ^this.primitiveFailed;
44 *joinStyle_ { arg style;
46 ^this.primitiveFailed;
49 *capStyle_ { arg style;
51 ^this.primitiveFailed;
54 *lineDash_ { arg pattern;
56 ^this.primitiveFailed;
61 ^this.primitiveFailed;
64 *blendMode_ { arg mode;
65 this.nonimpl("blendMode_");
68 *beginTransparencyLayer {
69 this.nonimpl("beginTransparencyLayer");
72 *endTransparencyLayer {
73 this.nonimpl("endTransparencyLayer");
78 ^this.primitiveFailed;
81 *smoothing_ { arg flag;
83 ^this.primitiveFailed;
88 this.prSetFont( aFont );
91 *prSetFont { arg aFont;
93 ^this.primitiveFailed;
96 //--------------------- Coordinate System Transform ----------------------------
98 *translate { arg x=0, y=0;
100 ^this.primitiveFailed;
103 *scale { arg x=0, y=0;
105 ^this.primitiveFailed;
108 *skew { arg x=0, y=0;
110 ^this.primitiveFailed;
113 *rotate { arg angle=0, x=0, y=0;
114 this.rotateDeg( angle.raddeg, x, y );
117 *rotateDeg { arg angle=0, x=0, y=0;
119 ^this.primitiveFailed;
122 *matrix_ { arg matrixArray;
124 ^this.primitiveFailed;
127 //-------------------------- Drawing Actions -----------------------------------
131 ^this.primitiveFailed;
135 this.nonimpl("path");
140 ^this.primitiveFailed;
145 ^this.primitiveFailed;
153 *curveTo { arg endPoint, cPoint1, cPoint2;
155 ^this.primitiveFailed;
158 *quadCurveTo { arg endPoint, cPoint;
160 ^this.primitiveFailed;
163 *arcTo { arg point1, point2, radius;
165 ^this.primitiveFailed;
168 *addRect { arg aRect;
170 ^this.primitiveFailed;
173 *addRoundedRect { arg aRect, radiusX, radiusY;
175 ^this.primitiveFailed;
180 ^this.primitiveFailed;
183 *addArc { arg center, radius, startAngle, arcAngle;
184 this.prAddArc( center, radius, startAngle.neg, arcAngle.neg );
187 *prAddArc { arg center, radius, startAngle, arcAngle;
189 ^this.primitiveFailed;
192 *addWedge { arg center, radius, startAngle, sweepLength;
193 this.addWedge_Deg( center, radius, (startAngle.neg).raddeg, (sweepLength.neg).raddeg );
196 *addWedge_Deg { arg center, radius, startAngle, sweepLength;
198 ^this.primitiveFailed;
201 *addAnnularWedge{ arg center, innerRadius, outerRadius, startAngle, sweepLength;
202 this.prAddAnnularWedge( center, innerRadius, outerRadius, startAngle.neg, sweepLength.neg );
205 *prAddAnnularWedge { arg center, innerRadius, outerRadius, startAngle, sweepLength;
206 _QPen_AddAnnularWedge
207 ^this.primitiveFailed;
220 ^this.primitiveFailed;
227 *strokeRect { arg rect;
228 this.addRect( rect );
232 *fillRect { arg rect;
233 this.addRect( rect );
237 *strokeOval { arg rect;
242 *fillOval { arg rect;
247 *fillAxialGradient { arg startPoint, endPoint, startColor, endColor;
248 _QPen_FillAxialGradient;
249 ^this.primitiveFailed;
252 *fillRadialGradient { arg innerCircleCenter, outerCircleCenter, startRadius, endRadius, startColor, endColor;
253 _QPen_FillRadialGradient;
254 ^this.primitiveFailed;
257 *setShadow { arg offsetPoint, blur, color;
258 this.nonimpl("setShadow");
261 *string { arg aString;
262 this.stringAtPoint( aString, Point(0,0) );
265 *stringAtPoint { arg string, point, font, color;
267 ^this.primitiveFailed;
270 *stringInRect { arg string, rect, font, color, alignment;
272 ^this.primitiveFailed;
275 *stringCenteredIn { arg string, rect, font, color;
276 this.stringInRect( string, rect, font, color, QAlignment(\center) );
279 *stringLeftJustIn { arg string, rect, font, color;
280 this.stringInRect( string, rect, font, color, QAlignment(\left) );
283 *stringRightJustIn { arg string, rect, font, color;
284 this.stringInRect( string, rect, font, color, QAlignment(\right) );
287 //---------------------- PRIVATE! -- Painter on/off-----------------------------
289 *prBegin { arg aQView;
291 ^this.primitiveFailed;
296 ^this.primitiveFailed;
299 *nonimpl { arg methodName;
300 (this.asString ++ ": " ++ methodName.asString ++ " is not implemented yet").postln;