Submit Browse Random
Anonymous Login RSS

SuperCollider Code

All (764) Code (64) Doc (175) Help (16) Quark (509) SCDoc ↗ Forum ↗ Google ↗
  1. JMDrawIcon Quark

    ... 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 ...

  2. MHexPad Quark

    ... 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 ...

  3. DrawIcon Quark

    // 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 ...

  4. 4_flatcat4_viz Quark

    ... 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 ...

  5. extWFSPath-draw Quark

    ... 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 ...

  6. extPen-roundedRect Quark

    ... 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 ...

  7. plusScaledUserView-drawTempoGrid Quark

    ... 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. ...

  8. plusScaledUserView-drawTempoGrid Quark

    ... 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. ...

  9. extVarGuiPlayerSection Quark

    ... 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 ...

  10. UPatternEventView Quark

    ... { 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 ...

1 2 3 4 5 6 7 8 9 10 next

SuperCollider home doc forum wiki git legacy help book

contact | by vividsnow