org.foray.common
Class Java2dUtil

java.lang.Object
  extended by org.foray.common.Java2dUtil

public final class Java2dUtil
extends Object

Utilities for Java2D.


Method Summary
static Rectangle2D.Float areaToJava2dCoordinates(Rectangle2D.Float inputRectangle, float pageHeight)
          Converts a rectangle from the FOray area tree coordinate system to the Java2D user space coordinate system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

areaToJava2dCoordinates

public static Rectangle2D.Float areaToJava2dCoordinates(Rectangle2D.Float inputRectangle,
                                                        float pageHeight)
Converts a rectangle from the FOray area tree coordinate system to the Java2D user space coordinate system. The FOray coordinate system maps 0,0 to the lower left corner of the page. The Java2D coordinate system maps 0,0 to the upper left corner of the page.

Parameters:
inputRectangle - The rectangle expressed in FOray area tree coordinates.
pageHeight - The height of the page on which the rectangle will be placed.
Returns:
A new Rectangle2D instance with the coordinates expressed in Java2D user space.


Copyright © 2017. All rights reserved.