nhn / tui.image-editor

🍞🎨 Full-featured photo image editor using canvas. It is really easy, and it comes with great filters.
http://ui.toast.com/tui-image-editor
MIT License
6.84k stars 1.26k forks source link

How to obtain the four corner coordinates of a rotated rectangle #861

Closed cutexiaokele closed 1 year ago

cutexiaokele commented 1 year ago

How to obtain the four corner coordinates of a rotated rectangle

I can obtain the drawn shape object, whose properties only include the center point and length/width. I need the coordinates of the four corners of the rectangle, and the coordinates of the four corners after the rectangle is rotated.