edu.stanford.hci.r3.paper.regions
Class ImageRegion

java.lang.Object
  extended by edu.stanford.hci.r3.paper.Region
      extended by edu.stanford.hci.r3.paper.regions.ImageRegion

public class ImageRegion
extends Region

Represents an Image.

This software is distributed under the BSD License.


Field Summary
 
Fields inherited from class edu.stanford.hci.r3.paper.Region
referenceUnits, scaleX, scaleY
 
Constructor Summary
ImageRegion(java.lang.String name, java.io.File imgFile, Units originX, Units originY)
          This constructor interprets the image as 72 pixels per physical inch.
ImageRegion(java.lang.String name, java.io.File imgFile, Units originX, Units originY, Pixels pixelConversion)
           
 
Method Summary
 java.io.File getFile()
           
 double getHeightVal()
           
 double getPixelsPerInch()
           
 RegionRenderer getRenderer()
          Subclasses should override this, to customize rendering.
 double getWidthVal()
           
 double getX()
          While the scale factors affect the size of the image, they do not affect the user-specified origins.
 double getY()
          While the scale factors affect the size of the image, they do not affect the user-specified origins.
 java.lang.String toString()
          Please override for more interesting output.
 
Methods inherited from class edu.stanford.hci.r3.paper.Region
addEventHandler, getEventHandlers, getFillColor, getHeight, getIsActiveString, getName, getOpacity, getOriginX, getOriginY, getParentSheet, getScaleX, getScaleY, getShape, getStrokeColor, getUnits, getUnscaledBounds2D, getUnscaledBoundsHeight, getUnscaledBoundsWidth, getUnscaledShapeCopy, getWidth, isActive, isVisible, resetScale, scaleRegion, scaleRegionUniformly, setActive, setFillColor, setName, setOpacity, setParentSheet, setScale, setShape, setStrokeColor, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImageRegion

public ImageRegion(java.lang.String name,
                   java.io.File imgFile,
                   Units originX,
                   Units originY)
This constructor interprets the image as 72 pixels per physical inch. Use the alternate constructor if you feel otherwise. ;)

Parameters:
imgFile -
originX -
originY -

ImageRegion

public ImageRegion(java.lang.String name,
                   java.io.File imgFile,
                   Units originX,
                   Units originY,
                   Pixels pixelConversion)
Parameters:
imgFile -
originX -
originY -
pixelConversion -
Method Detail

getFile

public java.io.File getFile()
Returns:

getHeightVal

public double getHeightVal()
Returns:

getPixelsPerInch

public double getPixelsPerInch()
Returns:

getRenderer

public RegionRenderer getRenderer()
Description copied from class: Region
Subclasses should override this, to customize rendering. Otherwise, you'll just get gray boxes, which is what RegionRenderer does.

Overrides:
getRenderer in class Region
Returns:
the renderer for this region
See Also:
Region.getRenderer()

getWidthVal

public double getWidthVal()
Returns:

getX

public double getX()
While the scale factors affect the size of the image, they do not affect the user-specified origins.

Returns:

getY

public double getY()
While the scale factors affect the size of the image, they do not affect the user-specified origins.

Returns:

toString

public java.lang.String toString()
Description copied from class: Region
Please override for more interesting output. This will print the name of the class along with all the segments of the shape.

Overrides:
toString in class Region
Returns:
the String representation of this Region
See Also:
Region.toString()

Copyright 2006 Stanford University