deltaluca/nape — Issue #15: GeomPoly.push error
Author: profelis
Created: 2011-10-24 23:07:10+00:00
State: open

It seems what GeomPoly.push add point to the beggining of list

simple exemple:

for each (var point:Point in vertices)
{
trace("push point", Vec2.fromPoint(point).toString());
poly.push(Vec2.fromPoint(point));
}

var geomVertexIterator:GeomVertexIterator = poly.iterator();
var traceStr:String = "";
while (geomVertexIterator.hasNext())
traceStr += geomVertexIterator.next().toString() + ",";
trace(traceStr);

trace output:

push point { x: -200 y: 200 }
{ x: -200 y: 200 },
push point { x: -200 y: -200 }
{ x: -200 y: -200 },{ x: -200 y: 200 },
push point { x: 200 y: -200 }
{ x: 200 y: -200 },{ x: -200 y: 200 },{ x: -200 y: -200 },
push point { x: 200 y: 200 }
{ x: 200 y: 200 },{ x: -200 y: 200 },{ x: -200 y: -200 },{ x: 200 y: -200 },