f5 color test 1
write as3 code here..
// write as3 code here..
// write as3 code here..
package{
import flash.display.*;
import flash.events.*;
import frocessing.FC;
import frocessing.core.F5Graphics2D;
import frocessing.color.FColor;
[SWF(frameRate="30", backgroundColor="#000000")]
public class FColorTest extends Sprite
{
public function FColorTest()
{
addEventListener(Event.ADDED_TO_STAGE,draw);
}
private function draw(e:Event):void
{
var fg:F5Graphics2D = new F5Graphics2D(graphics);
fg.noStroke();
fg.rectMode(FC.CENTER);
var c:FColor = new FColor();
c.hsv( 0, 1, 1 );
fg.beginDraw();
fg.translate( stage.stageWidth>>1, stage.stageHeight>>1);
fg.rotate( -FC.HALF_PI );
var n:int=100;
for( var i:int=0; i<n; i++ )
{
c.h += 360/n;
fg.fillColor = c.value;
fg.rect( 150, 0, 20, 5 );
fg.rotate( FC.TWO_PI/n );
}
fg.endDraw();
}
}
}