-
... ct ? (32@32)).asRect; ^this.drawFuncs.at(name).value( rect, *more ); // returns pen function } *initClass{ \DrawIcon.asClass.notNil.if{ Class.initClassTree(DrawIcon); this.drawFuncs.keysValuesDo{|k,v| DrawIcon.drawFuncs.put(k,v); } }; light ...
-
... ints = 7.collect { |i| Polar(center.y, 2pi * (i/6) + angle).asPoint + center }; Pen.fillColor = hexColor; Pen.moveTo(hexPoints.last); hexPoints.do(Pen.lineTo(_)); Pen.fill; if( pressed ) { Pen.width = 4; Pen.strokeColor_(hiliteColor); Pen.a ...
-
// wslib 2006 // // bank of iconographic Pen-functions DrawIcon { classvar <drawFuncs; *new { |name, rect ... more| rect = (rect ? (32@32)).asRect; ^drawFuncs[ name ].value( rect, *more ); // returns pen function } *symbolArgs { |name, rect ...
-
... rr2; // draw current force as ring segment + arrow var drawCurrent = { |curr=0| Pen.color = if (curr > 0, colorUp, colorDown); Pen.addAnnularWedge(0@0, 16, 20, pi, curr * 2pi); Pen.fill; // plus arrow tip triangle Pen.rotate(curr * 2pi + pi ...
-
... 1: lines, 2: points, 3: none, 4: hi-res lines scale = pixelScale.asArray.mean; Pen.use({ // draw contents Pen.scale( 1, -1 ); //// this points = this.positions.collect(_.asPoint); controls = if( this.respondsTo( \controls ) ) { this.contro ...
-
... 2006 // 1st step to SwingOsc compat :: 03/2008 // - no rounded rects yet: all + Pen { *roundedRect { |rect, radius| // radius can be array for 4 corners var points, lastPoint; radius = radius ?? { rect.width.min( rect.height ) / 2; }; if( r ...
-
... ewRect.right ); tempos = tempoMap.bpmsBetween( viewRect.left, viewRect.right ); Pen.color = Color.gray.alpha_(0.25); if( viewRect.width < (this.view.bounds.width/100) ) { Pen.use({ if( GUI.id == \cocoa ) { Pen.width = pixelScale.x / 2; Pen. ...
-
... ewRect.right ); tempos = tempoMap.bpmsBetween( viewRect.left, viewRect.right ); Pen.color = Color.gray.alpha_(0.25); if( viewRect.width < (this.view.bounds.width/100) ) { Pen.use({ if( GUI.id == \cocoa ) { Pen.width = pixelScale.x / 2; Pen. ...
-
... fac = 1, x = iconViewGroup[0].bounds.width, y = iconViewGroup[0].bounds.height; Pen.moveTo(Point(x * playX1, y * playY1)); Pen.lineTo(Point(x * (1-playX1), y * 0.5)); Pen.lineTo(Point(x * playX1, (1-playY1) * y)); Pen.width = 1.4 * fac; Pen ...
-
... { innerRect = scaledRect.insetBy(0.5,0.5); //selected outline if( selected ) { Pen.width = 2; Pen.color = Color.grey(0.2); this.drawShape(scaledRect); Pen.stroke; }; //event is playing if( event.isPlaying ) { Pen.width = 3; Pen.color = Col ...