You could use the transform(AffineTransform at) method on your Path2D star1, with an AffineTransform obtained from AffineTransform.getRotateInstance(double theta, double anchorx, double anchory) to rotate it by any desired angle
AffineTransformations look very scary, and often they are, but in essence they take a shape and change it by stretching, skewing, sheering, rotating etc. All you need is a simple rotation, which the method I suggested will give you.
API documentation is in the usual place.
JamesCherrill
Posting Genius
6,371 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
You can also rotate the current graphics context with the .rotate() method of the Graphics2D class. This part of the Java tutorial discusses these transformations.
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847