-
... o = true; w.drawFunc = { var fader, crossfades, lines, focusMul = 1; c.draw(m); Pen.addArc( p * (1 @ -1), 0.3/2, 0, 2pi ).fill; if( a == \point ) { focusMul = c.focusDetector.kr( p ); }; // draw corns as blue points Pen.color = Color.blue; ...
-
... t.min( vw.drawBounds.width ); center = vw.drawBounds.center; if( includeNeg ) { Pen.width = lineSize; lineColor.set; Pen.line( vw.drawBounds.left@center.y, vw.drawBounds.right@center.y ).stroke; Pen.line(center.x@vw.drawBounds.top, center.x ...
-
... tem.production, 0); }); } defaultCommands { ^( $F: {|depth, depthLength, index| Pen.line(Point(0, 0), Point(0, depthLength.neg)); Pen.stroke; Pen.translate(0, depthLength.neg); }, $G: {|depth, depthLength, index| Pen.translate(0, depthLengt ...
-
... Rect; var isVertical = swapXYFunc.notNil and: { bounds.height > bounds.width }; Pen.color_(preCol); nextRect = Rect(2,2, preAmp * maxwid, height); if (isVertical) { nextRect = swapXYFunc.(bounds, nextRect) }; Pen.addRect(nextRect); Pen.fill ...
-
... extent = 30, strokeColor, fillColor, name = 0| var pos = rect.center.asArray; //Pen.addRect(rect); //Pen.stroke; Pen.use{ Pen.width = strokeWidth; Pen.translate(*(pos.asArray)); Pen.strokeColor = strokeColor ?? {Color.gray(0.5)}; Pen.fillCo ...
-
... lor.rand), ) ); ( ~utext .drawFunc = { |uv| var bounds = uv.bounds.moveTo(0,0); Pen.stringCenteredIn("2d Slider \ninterface here?", bounds); }; /// right bottom: outvals ~uouts.drawFunc = { |uv| var bounds = uv.bounds.moveTo(0,0); var width ...
-
//gui example with userview / pen graphics //only plotting accelerometer data ( var board= CytonSerial("/dev/tty.usbserial-DM00DRM0", initAction: {|b| b.start}); //edit here to match your board //var board= CytonWifi(NetAddr("OpenBCI_WifiSh ...
-
... alse; c.draw(m); corners = c.uniqueCorners; focusMul = c.focusDetector.kr( p ); Pen.use({ Pen.scale( 1, -1 ); Pen.addArc( p, 0.164, 0, 2pi ).fill; Pen.width = 0.075; Pen.line( 0.2@0, -0.2@0 ).line( 0 @ 0.2, 0 @ -0.2 ).stroke; Pen.color = Co ...
-
... invals inph.inNames.do { |name, i| var rect = Rect(0, vstep * i, lWid, vstep); Pen.addRect(rect); Pen.color = Color.grey(inph.inValDict[name].biuni); Pen.fill; }; // write inNames inph.inNames.do { |name, i| var rect = Rect(0, vstep * i, l ...
-
... i; var bnds; // used with string value = value.asCollection.wrapAt([0,1]).sort; Pen.use { rect = this.drawBounds; drawBounds = rect.insetBy( border, border ); if( orientation == \h ) { drawBounds = Rect( drawBounds.top, drawBounds.left, dra ...