Find the center of any shape-summary

Source: Internet
Author: User

Rotating and zooming a rectangle or other shape is very similar to a square, and you can actually get the effect you want as long as you pan the origin to the center of the shape before zooming, rotating, or combining the zoom rotation. Remember that the center point of any shape is a half-width X-value and a half-height y-value! This requires the use of bounding box theory to find the center point

PS is a bit ugly! But I said I was trying to learn to sketch! Next year I will go to a special promotion of the art department HoHo (PS: I have been a computer undergraduate, postgraduate examination I think I am definitely kneeling, I said more than the craft is always right! But they all looked at me with contempt! No way to the king of the world view ordinary people are incomprehensible! Want to beat me to Shanghai railway station line up)

In addition, I wrote the demo mainly refer to the "HTML5 canvas Development detailed" this book! You can also buy a look

The cover of the book is New Zealand's Kaka bird! It's almost extinct, (terrible humans, the souls of Gaia's side are expected to be dispatched)

Find the center of any shape-summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.