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
Another way is by using Path2D, with it you can rotate the path only and not the entire graphics object:
Rectangle r = new Rectangle(x, y, width, height);
Path2D.Double path = new Path2D.Double();
path.append(r, false);
AffineTransform t = new AffineTransform();
t.rotate(angle);
path.transform(t);
g2.draw(path);