List of usage examples for java.awt.geom AffineTransform setToQuadrantRotation
public void setToQuadrantRotation(int numquadrants)
From source file:Main.java
public void paint(Graphics g) { Shape shape = new Rectangle2D.Float(100, 50, 80, 80); Graphics2D g2 = (Graphics2D) g; AffineTransform at = new AffineTransform(); at.setToQuadrantRotation(2); g2.setTransform(at);//from ww w . jav a 2s . co m g2.draw(shape); }