
jaitools.jiffle.runtime.CoordinateTransform Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jt-jiffle-language Show documentation
Show all versions of jt-jiffle-language Show documentation
Jiffle is a scripting language for creating and analysing raster images.
The newest version!
/*
* Copyright 2011 Michael Bedward
*
* This file is part of jai-tools.
*
* jai-tools is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* jai-tools is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with jai-tools. If not, see .
*
*/
package jaitools.jiffle.runtime;
import java.awt.Point;
/**
* A transform used by Jiffle to convert from world (processing area) coordinates
* to image (pixel) coordinates.
*
* @author Michael Bedward
* @since 0.1
* @version $Id: CoordinateTransform.java 1611 2011-04-03 09:20:05Z michael.bedward $
*/
public interface CoordinateTransform {
/**
* Converts from world to image coordinates. If {@code p} is not {@code 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.
*
* @param x world X ordinate
* @param y world Y ordinate
* @param p object to receive image coordinates (may be {@code null})
*
* @return image coordinates
*/
Point worldToImage(double x, double y, Point p);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy