org.jaitools.jiffle.runtime
Class IdentityCoordinateTransform

java.lang.Object
  extended by org.jaitools.jiffle.runtime.IdentityCoordinateTransform
All Implemented Interfaces:
CoordinateTransform

public class IdentityCoordinateTransform
extends java.lang.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
Version:
$Id: IdentityCoordinateTransform.java 1653 2011-06-16 10:23:02Z michael.bedward $
Author:
Michael Bedward

Constructor Summary
IdentityCoordinateTransform()
           
 
Method Summary
 java.awt.Point worldToImage(double x, double y, java.awt.Point p)
          Converts from world to image coordinates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentityCoordinateTransform

public IdentityCoordinateTransform()
Method Detail

worldToImage

public java.awt.Point worldToImage(double x,
                                   double y,
                                   java.awt.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


Copyright © 2011. All Rights Reserved.