In my app I’m drawing a polygon with display.newLine(). The way I’ve done this is to call this function without any vertices and then loop through the vertex list and add them with the :append() method:
Something ala this:
graphLine = display.newLine() for (all vertices) do graphLine:append(vtxArr[i].x, vtxArr[i].y) end
I’m sure this worked before, but now I can’t run this, because newLine requires a certain number of vertices in the creation call.
Don’t know when this became a requirement (I’m brushing dust of an old app), but I guess it’s a fair enough requirement…
I can use the first two vertices in the creation call and then use a loop with appends, but is it possible to pre-assemble an vertex array and use it directly in the newLine() call?