Well , you guys were right about that.It's working for me the way
you told how this is done.But.. the problem is how to convert these real world (paper coordinates) to Java coordinates system.Maybe there is api available to get done this job.
However ,you guys have almost solved this problem but I want
to put forward another question regarding the coordinates.
Here is what I got for drawing a flower.
FLOWER
Start (4,4) , (0,0) , (-3,0) , (-2,3) , (4,4) , (-2,7) , (-3,10) , (0,10) , (4,4) , (3,9) ,(5,11) , (6,9) , (4,4) , (9,9) , (11,8) , (10,6) , (4,4) , (10,4) , (12,2) , (10,1) ,(4,4) , (8,-2) , (7,-5) , (4,-3) , (4,4) Stop
Start (0,-8) , (4,-6) , (6,-7) , (4,-8) , (0,-8) Stop
Start (-1,-11) , (-3,-7) , (-6,-6) , (-5,-9) , (-1,-11) Stop
Start (1,-15) , (5,-11) , (8,-11) , (7,-13) , (1,-15) Stop
Start (4,4) , (-1,-11) , (2,-17) Stop
After I wrote codes for the above flower , I only see the half of the drawing and it does not look like a flower.Some parts
of the flower is missing mate. *puzzled*
here is the Java code for the flower
GeneralPath flower = new GeneralPath();
flower.moveTo(200,200);
flower.lineTo(4,4); //start
flower.lineTo(0,0);
flower.lineTo(-3,0);
flower.lineTo(-2,3);
flower.lineTo(4,4);
flower.lineTo(-2,7);
flower.lineTo(-3,10);
flower.lineTo(0,10);
flower.lineTo(4,4);
flower.lineTo(3,9);
flower.lineTo(5,11);
flower.lineTo(6,9);
flower.lineTo(4,4);
flower.lineTo(9,9);
flower.lineTo(11,8);
flower.lineTo(10,6);
flower.lineTo(4,4);
flower.lineTo(10,4);
flower.lineTo(12,2);
flower.lineTo(10,1);
flower.lineTo(4,4);
flower.lineTo(8,-2);
flower.lineTo(7,-2);
flower.lineTo(4,-3);
flower.lineTo(4,4); //stop
flower.lineTo(0,-8);//start
flower.lineTo(4,-6);
flower.lineTo(6,-7);
flower.lineTo(4,-8);
flower.lineTo(0,-8);//stop
flower.lineTo(-1,-11);//start
flower.lineTo(-3,-7);
flower.lineTo(-6,-6);
flower.lineTo(-5,-9);
flower.lineTo(-1,-11);//stop
flower.lineTo(1,-15);//start
flower.lineTo(5,-11);
flower.lineTo(8,-11);
flower.lineTo(7,-13);
flower.lineTo(1,-15);//stop
flower.lineTo(4,4);//start
flower.lineTo(-1,-11);
flower.lineTo(2,-17);//stop
Am I missing any functions for 'start' and 'stop'.?
Please throw some lights on the problem. :)