Class IdentityCoordinateTransform

Object
IdentityCoordinateTransform
All Implemented Interfaces:
CoordinateTransform

public class IdentityCoordinateTransform extends Object implements 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 Details

  • Method Details

    • worldToImage

      public Point worldToImage(double x, double y, Point p)
      Converts from world to image coordinates. If p is not null it 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:
      worldToImage in interface CoordinateTransform
      Parameters:
      x - world X ordinate
      y - world Y ordinate
      p - object to receive image coordinates (may be null)
      Returns:
      image coordinates