So I have a CGRect and it has a size and a CGpoint call origin. Is origin the center of the square or the top left?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.