I have several shapes that I want to rotate and keep the same distance between them. What's the best way to do that ? I was thinking to calculate the center of the rectangle that wraps the selected shapes and rotate the shaped compared to that point
This is my code
while(iter.hasNext() ){
shape = (Shape)iter.next();
anchor = getCenter();
AffineTransform t = shape.getAffineTransform();
t.rotate(Math.toRadians(thetaDegrees), anchor.x, anchor.y);
shape.setAffineTransform(t);
}
Thanks