Skip to main content
3 of 3
replaced http://stackoverflow.com/ with https://stackoverflow.com/

Each corner should be rotated around the center of the box.

Typically this would be done by translating the box back to the origin, rotating, then translating back to the starting position.

Imagine the points that make up the corners rotating around a circle:

enter image description here

For rotating each point, see this answer.

House
  • 73.3k
  • 17
  • 185
  • 273