Package de.intarsys.tools.geometry
Class GeometryTools
java.lang.Object
de.intarsys.tools.geometry.GeometryTools
Tool class for common geometry tasks.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
deltaTransformPoint
(AffineTransform transform, float[] pts) static Point2D
deltaTransformPoint
(AffineTransform transform, float x, float y) static void
deltaTransformPoint
(AffineTransform transform, Point2D pt) static void
inverseTransformRect
(AffineTransform transform, Rectangle2D rect) Transform a rectangle in device space to user space.static void
normalizeRect
(float[] pts) static void
normalizeRect
(Rectangle2D rect) Normalize the rectangle.static float[]
toFloatArray
(Rectangle2D rect) static void
transformPoint
(AffineTransform transform, float[] pts) static Point2D
transformPoint
(AffineTransform transform, float x, float y) static void
transformPoint
(AffineTransform transform, Point2D pt) static void
transformRect
(AffineTransform transform, float[] pts) static void
transformRect
(AffineTransform transform, Rectangle2D rect) Transform a rectangle, the rectangle is modified.
-
Method Details
-
deltaTransformPoint
-
deltaTransformPoint
-
deltaTransformPoint
-
inverseTransformRect
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
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
-
transformPoint
-
transformPoint
-
transformPoint
-
transformRect
-
transformRect
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.
-