I draw an oval as follows g.fillOval (0, 0, 100, 40); How to rotate it relative to the center of the shape at an arbitrary angle?

  • What graphic framework do you use? - VladD

2 answers 2

http://docs.oracle.com/javase/7/docs/api/java/awt/geom/AffineTransform.html#rotate(double)

     public void rotate(double theta, double anchorx, double anchory) 

    perfect fit.