Rotate a Java Graphics2D Rectangle?

前端 未结 4 1738

I have searched everywhere and I just cant find the answer.
How do I rotate a Rectangle in java?

Here is some of my code:

package net.chrypthic.S         


        
4条回答
  •  有刺的猬
    2020-11-28 11:46

    The only problem with g2d.rotate is that it doesn't rotate it around a specific point. It will mostly mess up where you want your Image and then force you to move the x and y coordinates of the image. I would not use it,expecially for a game. What you should look into is rotating a point in java.

提交回复
热议问题