Class IdentityCoordinateTransform
Object
IdentityCoordinateTransform
- All Implemented Interfaces:
CoordinateTransform
An implementation of
CoordinateTransform which simple converts input coordinates to integers by
rounding. This is the default transform used by Jiffle and is slightly faster than using an identity
AffineCoordinateTransform.- Since:
- 0.1
- Author:
- Michael Bedward
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionworldToImage(double x, double y, Point p) Converts from world to image coordinates.
-
Field Details
-
INSTANCE
-
-
Method Details
-
worldToImage
Converts from world to image coordinates. Ifpis notnullit will be set to the image coordinates, otherwise a new destination object will be created. In both cases, the resulting point is returned.- Specified by:
worldToImagein interfaceCoordinateTransform- Parameters:
x- world X ordinatey- world Y ordinatep- object to receive image coordinates (may benull)- Returns:
- image coordinates
-