From 4f4adc0afb4c4feacd28383f740646b1fb913693 Mon Sep 17 00:00:00 2001
From: Axel Howind The method first retrieves the inverse of the current transformation using {@link #getTransformation()} and
* throws an exception if the transformation is not present. Then, it calculates the bounds of the graphics using
* the {@link #getBounds()} method. Finally, it transforms the minimum and maximum coordinates of the bounds using
- * the inverse transformation to obtain the bounds in the local coordinate space.
For rotation with an absolute amount larger than π/4, the y-coordinate is used for alignment instead. */ @@ -645,7 +645,7 @@ private void renderFragments(Rectangle2f cr, Alignment hAlign, VerticalAlignment sx_h = 0.0f; } else { setTransformation(AffineTransformation2f.combine(t, AffineTransformation2f.rotate(angle, Vector2f.of(cr.x(), cr.y())))); - switch ((int) (angle/MathUtil.PI_QUARTER)) { + switch ((int) (angle / MathUtil.PI_QUARTER)) { case 0, 4 -> { sx_y = (float) (Math.tan(angle)); sx_h = sx_y; @@ -843,7 +843,7 @@ static void approximateArc( double endAngle = Math.atan2(p1l.y() - cl.y(), p1l.x() - cl.x()); double sweepAngle; float sweepSign = sweep ? 1 : -1; - if (sweepSign * endAngle < sweepSign *startAngle) { + if (sweepSign * endAngle < sweepSign * startAngle) { endAngle += sweepSign * 2 * Math.PI; } sweepAngle = endAngle - startAngle;