org.jaitools.jiffle.runtime
Class AffineCoordinateTransform

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

public class AffineCoordinateTransform
extends java.lang.Object
implements CoordinateTransform

Wraps an AffineTransform object for use as a Jiffle CoordinateTransform.

Since:
0.1
Version:
$Id: AffineCoordinateTransform.java 1653 2011-06-16 10:23:02Z michael.bedward $
Author:
Michael Bedward

Constructor Summary
AffineCoordinateTransform(java.awt.geom.AffineTransform affine)
          Creates a new instance to wrap the given AffineTransform.
 
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

AffineCoordinateTransform

public AffineCoordinateTransform(java.awt.geom.AffineTransform affine)
Creates a new instance to wrap the given AffineTransform. If tr is null an identity transform will be used. The input transform is copied.

Parameters:
affine - the transform
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.