com.threerings.media.image
Class BackedVolatileMirage

java.lang.Object
  extended by com.threerings.media.image.VolatileMirage
      extended by com.threerings.media.image.BackedVolatileMirage
All Implemented Interfaces:
Mirage

public class BackedVolatileMirage
extends VolatileMirage

Provides a volatile mirage that is backed by a buffered image that is not obtained from the image manager but is instead provided at construct time and completely circumvents the image manager's cache. As such, this should not be used unless you know what you're doing.


Field Summary
protected  BufferedImage _source
           
 
Fields inherited from class com.threerings.media.image.VolatileMirage
_bounds, _image, _imgr, IMAGE_DEBUG
 
Constructor Summary
BackedVolatileMirage(ImageManager imgr, BufferedImage source)
          Creates a mirage with the supplied regeneration informoation and prepared image.
 
Method Summary
protected  int getTransparency()
          Returns the transparency that should be used when creating our volatile image.
protected  void refreshVolatileImage()
          Rerenders our volatile image from the its source image data.
protected  void toString(StringBuilder buf)
          Generates a string representation of this instance.
 
Methods inherited from class com.threerings.media.image.VolatileMirage
createVolatileImage, getEstimatedMemoryUsage, getHeight, getSnapshot, getWidth, getX, getY, hitTest, paint, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_source

protected BufferedImage _source
Constructor Detail

BackedVolatileMirage

public BackedVolatileMirage(ImageManager imgr,
                            BufferedImage source)
Creates a mirage with the supplied regeneration informoation and prepared image.

Method Detail

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

toString

protected void toString(StringBuilder buf)
Description copied from class: VolatileMirage
Generates a string representation of this instance.

Overrides:
toString in class VolatileMirage