Here you can find the source of rotateArea(Area a, double rotation, Point2D rotateAround)
synchronized public static void rotateArea(Area a, double rotation, Point2D rotateAround)
//package com.java2s; //License from project: Open Source License import java.awt.geom.*; public class Main { synchronized public static void rotateArea(Area a, double rotation, Point2D rotateAround) { AffineTransform at1 = AffineTransform.getTranslateInstance(rotateAround.getX(), rotateAround.getY()); at1.rotate(rotation);/*from w w w . j av a2s . c o m*/ at1.translate(-rotateAround.getX(), -rotateAround.getY()); a.transform(at1); } synchronized public static void rotateArea(Area a, double rotation) { Rectangle2D bounds = a.getBounds2D(); rotateArea(a, rotation, new Point2D.Double(bounds.getX() + bounds.getWidth() / 2, bounds.getY() + bounds.getHeight() / 2)); } }