sub_arctic.contrib
Class FadingImage

java.lang.Object
  |
  +--sub_arctic.contrib.FadingImage

public class FadingImage
extends java.lang.Object


Field Summary
static int DEFAULT_STEP_SIZE
           
static int OPAQUE
           
static int TRANSPARENT
          Constants
 
Constructor Summary
FadingImage(loaded_image image)
          Constructor; create new fading image from a loading image, using default alpha step size.
FadingImage(loaded_image image, int alphaStepSize)
          Constructor; create new fading image from a loading image
 
Method Summary
 int getHeight()
          Return height of image
 int getWidth()
          Return width of image
 loaded_image imageForAlpha(int alpha)
          Return version of image using given alpha value.
 loaded_image opaqueImage()
          Return opaque version of image
 loaded_image transparentImage()
          Return transparent version of image
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRANSPARENT

public static final int TRANSPARENT
Constants

OPAQUE

public static final int OPAQUE

DEFAULT_STEP_SIZE

public static final int DEFAULT_STEP_SIZE
Constructor Detail

FadingImage

public FadingImage(loaded_image image)
Constructor; create new fading image from a loading image, using default alpha step size.
Parameters:
image - the image to be faded

FadingImage

public FadingImage(loaded_image image,
                   int alphaStepSize)
Constructor; create new fading image from a loading image
Parameters:
image - the image to be faded
alphaStepSize - the step size to be used for alpha values. A "flip card" image is made for every "step size" alpha values between transparent and opaque. A smaller step size allows a smoother fade but is more expensive
Method Detail

imageForAlpha

public loaded_image imageForAlpha(int alpha)
Return version of image using given alpha value.

transparentImage

public loaded_image transparentImage()
Return transparent version of image

opaqueImage

public loaded_image opaqueImage()
Return opaque version of image

getWidth

public int getWidth()
Return width of image

getHeight

public int getHeight()
Return height of image