com.threerings.cast
Class CompositedMultiFrameImage.CompositedVolatileMirage

java.lang.Object
  extended by com.threerings.media.image.VolatileMirage
      extended by com.threerings.cast.CompositedMultiFrameImage.CompositedVolatileMirage
All Implemented Interfaces:
CompositedMirage, Mirage, Comparator<CompositedActionFrames.ComponentFrames>
Direct Known Subclasses:
CompositedMaskedImage.MaskedMirage
Enclosing class:
CompositedMultiFrameImage

protected class CompositedMultiFrameImage.CompositedVolatileMirage
extends VolatileMirage
implements CompositedMirage, Comparator<CompositedActionFrames.ComponentFrames>

Used to create our mirage using the source action frame images.


Field Summary
protected  int _index
           
protected  Point _origin
           
 
Fields inherited from class com.threerings.media.image.VolatileMirage
_bounds, _image, _imgr, IMAGE_DEBUG
 
Constructor Summary
CompositedMultiFrameImage.CompositedVolatileMirage(int index)
           
 
Method Summary
protected  Rectangle combineBounds(Rectangle bounds, Rectangle tbounds)
          Combines the working bounds with a new set of bounds.
 int compare(CompositedActionFrames.ComponentFrames cf1, CompositedActionFrames.ComponentFrames cf2)
           
protected  int getTransparency()
          Returns the transparency that should be used when creating our volatile image.
 int getXOrigin()
          Returns the x offset into our image.
 int getYOrigin()
          Returns the y offset into our image.
protected  void refreshVolatileImage()
          Rerenders our volatile image from the its source image data.
 
Methods inherited from class com.threerings.media.image.VolatileMirage
createVolatileImage, getEstimatedMemoryUsage, getHeight, getSnapshot, getWidth, getX, getY, hitTest, paint, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.threerings.media.image.Mirage
getEstimatedMemoryUsage, getHeight, getSnapshot, getWidth, hitTest, paint
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

_index

protected int _index

_origin

protected Point _origin
Constructor Detail

CompositedMultiFrameImage.CompositedVolatileMirage

public CompositedMultiFrameImage.CompositedVolatileMirage(int index)
Method Detail

getXOrigin

public int getXOrigin()
Description copied from interface: CompositedMirage
Returns the x offset into our image.

Specified by:
getXOrigin in interface CompositedMirage

getYOrigin

public int getYOrigin()
Description copied from interface: CompositedMirage
Returns the y offset into our image.

Specified by:
getYOrigin in interface CompositedMirage

compare

public int compare(CompositedActionFrames.ComponentFrames cf1,
                   CompositedActionFrames.ComponentFrames cf2)
Specified by:
compare in interface Comparator<CompositedActionFrames.ComponentFrames>

combineBounds

protected Rectangle combineBounds(Rectangle bounds,
                                  Rectangle tbounds)
Combines the working bounds with a new set of bounds.


getTransparency

protected int getTransparency()
Description copied from class: VolatileMirage
Returns the transparency that should be used when creating our volatile image.

Specified by:
getTransparency in class VolatileMirage

refreshVolatileImage

protected void refreshVolatileImage()
Description copied from class: VolatileMirage
Rerenders our volatile image from the its source image data.

Specified by:
refreshVolatileImage in class VolatileMirage