com.partnersoft.gui
Class ImageRotationSet

java.lang.Object
  extended by com.partnersoft.gui.ImageRotationSet

public class ImageRotationSet
extends java.lang.Object

This caches and manages various quantum rotations of an image. These are generated only when needed, then saved for future use. Rotations are numbered; there are 16 possible, counted from due east (zero degrees) and proceeding counter-clockwise. They are store as ImageRotation objects; these manage the offsets, true width and height, centering data, etc.

Author:
Paul Reavis Copyright 2002-2004 Partner Software, Inc.

Field Summary
static int NUMBER_OF_ROTATIONS
           
 
Constructor Summary
ImageRotationSet(java.awt.Image original)
           
 
Method Summary
 ImageRotation getIndexedRotation(int index)
          Gets the numbered rotation; creates it if it hasn't been gotten before.
 ImageRotation getRotation(float theta)
          Gets the rotation closest to the given theta in radians.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NUMBER_OF_ROTATIONS

public static final int NUMBER_OF_ROTATIONS
See Also:
Constant Field Values
Constructor Detail

ImageRotationSet

public ImageRotationSet(java.awt.Image original)
Method Detail

getIndexedRotation

public ImageRotation getIndexedRotation(int index)
Gets the numbered rotation; creates it if it hasn't been gotten before.


getRotation

public ImageRotation getRotation(float theta)
Gets the rotation closest to the given theta in radians.