Class GeometryTools

java.lang.Object
de.intarsys.tools.geometry.GeometryTools

public class GeometryTools extends Object
Tool class for common geometry tasks.
  • Method Details

    • deltaTransformPoint

      public static Point2D deltaTransformPoint(AffineTransform transform, float x, float y)
    • deltaTransformPoint

      public static void deltaTransformPoint(AffineTransform transform, float[] pts)
    • deltaTransformPoint

      public static void deltaTransformPoint(AffineTransform transform, Point2D pt)
    • inverseTransformRect

      public static void inverseTransformRect(AffineTransform transform, Rectangle2D rect)
      Transform a rectangle in device space to user space. The rectangle is modified. The coordinates of the result are normalized (lower left corner has smallest coordinate values).
      Parameters:
      transform - The transformation from user space to device space.
      rect - The rectangle whose coordinates are transformed, the rectangle is modified.
    • normalizeRect

      public static void normalizeRect(float[] pts)
    • normalizeRect

      public static void normalizeRect(Rectangle2D rect)
      Normalize the rectangle. The x and y value of the rectangle are updated to have the smallest coordinates (lower left corner).
      Parameters:
      rect - The rectangle whose coordinates are normalized, the rectangle is modified.
    • toFloatArray

      public static float[] toFloatArray(Rectangle2D rect)
    • transformPoint

      public static Point2D transformPoint(AffineTransform transform, float x, float y)
    • transformPoint

      public static void transformPoint(AffineTransform transform, float[] pts)
    • transformPoint

      public static void transformPoint(AffineTransform transform, Point2D pt)
    • transformRect

      public static void transformRect(AffineTransform transform, float[] pts)
    • transformRect

      public static void transformRect(AffineTransform transform, Rectangle2D rect)
      Transform a rectangle, the rectangle is modified. The coordinates of the result are normalized (lower left corner has smallest coordinate values).
      Parameters:
      transform - The transformation from user space to device space.
      rect - The rectangle whose coordinates are transformed, the rectangle is modified.