Commit 9d58dc0e authored by Nico Mack's avatar Nico Mack

Fixed bug in getBoundingBoxAtAngle method

parent a35d5466
......@@ -1162,7 +1162,7 @@ public class ShapeUtils {
public static BoundingBox getBoundingBoxAtAngle(Shape shape, double angle) {
Point centre = centroidOf(shape);
AffineTransform rotation = AffineTransform.getRotateInstance(angle, centre.getX(), centre.getY());
AffineTransform rotation = AffineTransform.getRotateInstance(-angle, centre.getX(), centre.getY());
Shape rotated = rotation.createTransformedShape(shape);
return new BoundingBox(rotated.getBounds2D(), angle);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment