Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
I do not understand this setAnchorPoint — Gideros Forum

I do not understand this setAnchorPoint

sslivkasslivka Member
edited May 2013 in General questions
image
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).
setAnchorPoint.png
435 x 467 - 9K

Comments

Sign In or Register to comment.