core
Class SubImage

java.lang.Object
  extended by core.SubImage

public class SubImage
extends java.lang.Object

Instances of this class represent an clipped image from a original larger image and gives the possibility to transform a path drawn in the clipped image into it's equivalent relative to a smaller version of the original large image.


Constructor Summary
SubImage(java.awt.image.BufferedImage smallImage, java.awt.geom.Rectangle2D.Double clipping, int zoom, java.awt.image.BufferedImage largeImage)
          Creates a new instance of this class given the small image to compute the transformations needed to be made to the path created in the clipped image, the clipping rectangle, the zoom level and the larger (higher quality) image from where the small image was created
 
Method Summary
 void dispose()
           
 java.awt.geom.GeneralPath getSmallPath(java.awt.geom.GeneralPath generalPath)
          Converts a given path to it's equivalent relative to the small (not zoomed) image
 java.awt.image.BufferedImage getSubImage()
          Returns the clipped image
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubImage

public SubImage(java.awt.image.BufferedImage smallImage,
                java.awt.geom.Rectangle2D.Double clipping,
                int zoom,
                java.awt.image.BufferedImage largeImage)
Creates a new instance of this class given the small image to compute the transformations needed to be made to the path created in the clipped image, the clipping rectangle, the zoom level and the larger (higher quality) image from where the small image was created

Parameters:
smallImage - the desired image dimensions
clipping - the rectangle used to do the clipping
zoom - how many times the small image to be zoomed
largeImage - a higher quality image from where the small image was created
Method Detail

getSubImage

public java.awt.image.BufferedImage getSubImage()
Returns the clipped image

Returns:
the clipped image

getSmallPath

public java.awt.geom.GeneralPath getSmallPath(java.awt.geom.GeneralPath generalPath)
Converts a given path to it's equivalent relative to the small (not zoomed) image

Parameters:
generalPath - the path to convert
Returns:
a new transformed path

dispose

public void dispose()