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 voiddeltaTransformPoint(AffineTransform transform, float[] pts) static Point2DdeltaTransformPoint(AffineTransform transform, float x, float y) static voiddeltaTransformPoint(AffineTransform transform, Point2D pt) static voidinverseTransformRect(AffineTransform transform, Rectangle2D rect) Transform a rectangle in device space to user space.static voidnormalizeRect(float[] pts) static voidnormalizeRect(Rectangle2D rect) Normalize the rectangle.static float[]toFloatArray(Rectangle2D rect) static voidtransformPoint(AffineTransform transform, float[] pts) static Point2DtransformPoint(AffineTransform transform, float x, float y) static voidtransformPoint(AffineTransform transform, Point2D pt) static voidtransformRect(AffineTransform transform, float[] pts) static voidtransformRect(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.
-