I tried the Shapes example in Gideros Studio and I always get (0, 0) when calling shape:getPosition(). Same for shape:getX() or shape:getY(). If I do a shape:setPosition(x, y) then the shape is shifted from the initial position by x and y pixels.
Does anyone else have this problem or am I using the wrong way? How do I get the correct position of a Shape (either top-left point or mid point)?
Comments
Such as a red square that I can move around:
When you create a shape, its default position is 0,0. You can then draw lines as I have done above at any coordinate. But when you get the position of the shape itself, which is not the position of the lines, then the position is still 0,0. Not where the lines were drawn.
Not sure that I'm making myself clear there .