34 lines
968 B
Java
34 lines
968 B
Java
|
|
package math;
|
||
|
|
|
||
|
|
import java.awt.geom.AffineTransform;
|
||
|
|
import java.awt.geom.Rectangle2D;
|
||
|
|
|
||
|
|
/**
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
public interface ViewTransformation
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* @return The last reflection.
|
||
|
|
*/
|
||
|
|
public AffineTransform getLastReflection();
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @return The last transform.
|
||
|
|
*/
|
||
|
|
public AffineTransform getLastTransform();
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @param displayBounds
|
||
|
|
* The bounds of the display area
|
||
|
|
* @param contentBounds
|
||
|
|
* The bounds of the content area
|
||
|
|
* @return The transform that maps content coordinates to display coordinates, while maintaining
|
||
|
|
* the aspect ratio of the content. The content is reflected across the horizontal axis to
|
||
|
|
* match the typical display coordinate system where the y-axis increases downwards. The
|
||
|
|
* transformation also centers the content within the display bounds.
|
||
|
|
*/
|
||
|
|
public AffineTransform getTransform(final Rectangle2D displayBounds,
|
||
|
|
final Rectangle2D contentBounds);
|
||
|
|
}
|