1 | Rotating about the polygon's center of gravity is not much harder: public DrawablePolygon centerRotate( double theta ) { Rectangle r = this.getBounds(); int x0 = r.x + r.width/2; int y0 = r.y + r.height/2; Point p = new Point( x0, y0 ); return this.rotate( theta, p ); } |