Polygon object adds 3 or 4 point more with 0,0 :S
why when adding to a polygon object a point equal to the first one it adds 3 points more with 0,0
[104 byte] By [
eckoa] at [2007-11-27 0:20:20]

sorry let me explain well my self:
Polygon temp = new Polygon();
temp.addPoint(8,9);
...
...
temp.addPoint(8,9);
...
i have my Polygon objects and i add several points... when i add a point with same values as the first point it add 3 point more with values 0,0 so the arrays that xpoints() and ypoints() returns will be like these:
x[8,....,8,0,0,0] y[9,........9,0,0,0]
why?
eckoa at 2007-7-11 22:13:16 >

> sorry let me explain well my self:> ...An empty Polygon has a capacity of 4 points. When you add a fifth point, the backing arrays that hold the x- and y-values will be doubled: to a capacity of eight. When you add a ninth point, it'll be doubled again (to 16),