4

I'm attempting to rotate a polygon around a fixed axis using the rotate method in Graphics2d. However, after each rotation, the bounding box coordinates of the polygon don't seem to be updating--only the graphical representation. How might I go about fixing this?

4

1 回答 1

1

You are using a library method that simply does a graphical transform. It is working the way it was designed. To get the new coordinates, you will have to do the math.

EDIT: Here's a link to another question that has all the math you need.

Drawing a Rotated Rectangle

于 2013-03-31T00:57:20.650 回答