开发者

just what is the origin in cocos2d boundingBox

开发者 https://www.devze.com 2023-03-09 09:41 出处:网络
So I have开发者_如何学C a CGRect and it has a size and a CGpoint call origin.Is origin the center of the square or the top left?The CGRect defines how far the bounding box extends along each axis from

So I have开发者_如何学C a CGRect and it has a size and a CGpoint call origin. Is origin the center of the square or the top left?


The CGRect defines how far the bounding box extends along each axis from the origin point, so it will never be the center.

However, cocos2D has a default coordinate system where the origin is the bottom-left of the view, so the origin in this case would be the bottom-left of the box.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号