/********************************************* aNGELjUCER - taste graphic operations *********************************************/ #pragma extension "core" Random rand; ImagePreview preview; int w = 300; int h = 300; int draws = 50; // let us test paths void drawPath(Graphics@ gfx) { Path p; AffineTransform t; t.scaled(0.8f,0.6f); for (int i=0; i<4; i++) { p.addLineSegment(rand.nextFloat()*w, rand.nextFloat()*h, rand.nextFloat()*w, rand.nextFloat()*h, 2+rand.nextFloat()*20); p.quadraticTo(rand.nextFloat()*w, rand.nextFloat()*h, rand.nextFloat()*w, rand.nextFloat()*h); } gfx.setColour(Colour(1.0f,1.0f,0.0f,0.7f)); gfx.fillPath(p,t); gfx.setColour(Colour(0.0f,0.0f,0.0f,0.99f)); gfx.strokePath(p,t); } // let us test some line drawing void drawLines(Graphics@ gfx) { for (int i=0; i