public
Description: A port of the Processing visualization language to JavaScript.
Home | Edit | New

arc() bug?


arc(130, 130, 180, 180, PI/2,PI);

There seems to be a bug in the arc() method of processing.js. The above code draws a line from the center even if fill is off. This is not the same as the normal Processing JAVA output.


FIX

After hunting around the fix turned out to be supplied in the comments on http://ejohn.org/apps/processing.js/ and I’ve posted it here:

curContext.beginPath(); if ( doFill ) curContext.moveTo( x, y ); curContext.arc( x, y, curEllipseMode == p.CENTER_RADIUS ? width : width/2, start, stop, false ); if ( doFill ) curContext.fill();

Last edited by F1LT3R, Fri Sep 12 22:03:47 -0700 2008
Home | Edit | New
Versions: