In Topic (
http://www.giderosmobile.com/forum/discussion/3188/why-setanchorpoint0-5-0-5-is-not-center#Item_13) I learned that the very first point at top left is 0,0 not 1,1 and I understood why at
point:setAnchorPoint(0, 0)
point:setPosition(3, 3)
give such a result in the first picture - top left point of texture set on (3, 3) point on stage.
But I do not understand why at
point:setAnchorPoint(1, 1)
point:setPosition(3, 3)
the bottom-right point of texture set on (2, 2) point of stage not (3, 3)?
And when I use
point:setAnchorPoint(0.5, 0.5)
point:setPosition(3, 3)
the center point of texture also set on (2, 2) point of stage instead of (3, 3).
Comments
1.
point:setAnchorPoint(1, 1) -> you set ancher point to bottom right corner (3,3) so when you setPosition to (3,3) you de facto setPosition to (0,0) of overall picture and (3,3) for right bottom corner..
2.
point:setAnchorPoint(0.5, 0.5) ->you set ancher point to middle of square (2,2) so when you setPosition to (3, 3) you de facto setPosition to (1,1) of overall square and (3,3) for middle point of square..
https://play.google.com/store/apps/developer?id=My+name+is+Originality