// title: test test test silly gfx patch // author: s2s2s2s2s // description: // romanessco // code: // romanescoesque ( var wi = 400, he = 400; var window = Window( "", Rect(100,100,wi+20,he+20) ).front; var view = UserView( window,Rect(10,10,wi,he) ).canFocus_(false); var c1 = Color.green( 0.2 ).alpha_( 0.1 ),c2 = Color.green, numSteps = 64, cstep = reciprocal( numSteps-1 ); var point = Point(wi/2,he/2); var rect1 = Rect.aboutPoint( point, 10,10 ); var rect2 = Rect.aboutPoint( point, 140,140 ); var xstep = ( rect2.width-rect1.width ) / 2 / ( numSteps -1 ); var ystep = ( rect2.height-rect1.height ) / 2 / ( numSteps -1 ); view.drawFunc = { |v| var b0 = v.bounds.moveTo( 0,0 ); Color.black.set; Pen.fillRect( b0 ); Pen.width = 1; do( numSteps, { |i| blend( c1,c2, i*cstep ).set; Pen.use({ Pen.rotate( pi * 4 / (numSteps-1) * i, wi/2,he/2 ); Pen.fillRect( rect2.insetBy( i*xstep, i*ystep ) ) }) // Color.grey.set; // Pen.strokeRect( rect2.insetBy( i*xstep, i*ystep ) ); }) } )