com.threerings.opengl.util
Class ImageCache

java.lang.Object
  extended by com.threerings.opengl.util.ResourceCache
      extended by com.threerings.opengl.util.ImageCache

public class ImageCache
extends ResourceCache

A cache for images.


Constructor Summary
ImageCache(GlContext ctx, boolean checkTimestamps)
          Creates a new image cache.
 
Method Summary
 void clear()
          Clears the cache, forcing resources to be reloaded.
 BufferedImage getBufferedImage(String path, com.threerings.media.image.Colorization... zations)
          Retrieves a buffered image from the cache.
 Image getImage(String path, com.threerings.media.image.Colorization... zations)
          Retrieves a GUI image from the cache.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageCache

public ImageCache(GlContext ctx,
                  boolean checkTimestamps)
Creates a new image cache.

Parameters:
checkTimestamps - if true, check the last-modified timestamp of each resource file when we retrieve it from the cache, reloading the resource if the file has been modified externally.
Method Detail

getImage

public Image getImage(String path,
                      com.threerings.media.image.Colorization... zations)
Retrieves a GUI image from the cache.


getBufferedImage

public BufferedImage getBufferedImage(String path,
                                      com.threerings.media.image.Colorization... zations)
Retrieves a buffered image from the cache.


clear

public void clear()
Clears the cache, forcing resources to be reloaded.



Copyright © 2011. All Rights Reserved.