-
Visual demonstration of aliasing/foldover (modified from James Harkins) by jnarveson (jnarveson) Code
... eColor = Color.grey; win.drawHook = { var pt; pt = Point(0, height/2); Pen.color_(sampColor) .moveTo(pt); (1..sampPts).do { |x| Pen.moveTo(pt); pt = Point(x * (width / sampPts), sin(x * freq / sampPts * 2pi).linlin(-1, 1 ...
-
... r community. This demonstrates how to : - Create a standalone module which opens inside a new window, - Create a custom graphical 2d slider. Be careful, it only responds to mouse action, not to keyboard instructions, - Write a simple ...
-
... etup h_slider.background_( Color.black ); h_slider.drawFunc_( { | view | Pen.width = 1; ( view.bounds.height - ( margin * 2 ) ).do( { | index | Pen.strokeColor_( hsv_to_color.value( [ index.linlin( 0, ...
-
... lineColor = Color.green.alpha_(0.5); // for retro style if( ypos == 0 ) { Pen.fillColor = Color.black; Pen.fillRect(view.bounds) }; // clear on new begin c.getn(0, numFreqs-1, { |v| d = v }); // get mag buffer data Pen.stroke ...
-
... Color = Color.black; win.drawHook = { var pt; pt = Point(0, height/2); Pen.color_(sampColor) .moveTo(pt); (1..sampPts).do { |x| Pen.moveTo(pt); pt = Point(x * (width / sampPts), sin(x * freq / sampPts * 2pi).linlin(-1, 1 ...
-
... var string_rect; var string_color; if( current_state == index, { Pen.fillColor_( state[ 2 ] ) }, { Pen.fillColor_( state[ 5 ] ) } ); if( orientation == \horizontal, { Pen.fillRect( Rect( m ...
-
... b0 = v.bounds.moveTo( 0,0 ); Color.black.set; Pen.fillRect( b0 ); Pen.width = 1; do( numSteps, { |i| blend( c1,c2, i*cstep ).set; ...
-
... 1, cogInsideShape[0])*inner, Point(1, cogInsideShape[1])*inner ]*radius; Pen.strokeOval(Rect.aboutPoint(Point(0, 0), center*radius, center*radius)); numCogs.do{ Pen.moveTo(cogs[0]); Pen.lineTo(cogs[1]); cogs= cogs.collect{ ...
-
... the function used to draw the custom input_view: input_view.drawFunc = { Pen.width = stroke_size; // First, draw the background frame: Pen.addRect( Rect(0,0, input_view.bounds.width,input_view.bounds.height) ); Pen.fillAxi ...
-
... = that.scale; radius = that.radius * scale; // Draw outline Pen.line(that.ox@that.oy,that.x@that.y); // not in qt... if((GUI.scheme == "CocoaGUI") and: (radius > 5.0), { Pen.setShadow(1@1, scal ...