com.threerings.media.tile
Interface ImageProvider

All Known Implementing Classes:
BundledComponentRepository.ResourceBundleProvider, IMImageProvider, SimpleCachingImageProvider

public interface ImageProvider

Provides a generic interface via which tileset images may be loaded. In most cases, a running application will want to obtain images via the ClientImageManager, but in some circumstances a simpler image provider may be desirable to avoid the overhead of the image manager infrastructure when simple image loading is all that is desired.


Method Summary
 Mirage getTileImage(String path, Rectangle bounds, Colorization[] zations)
          Obtains the tile image with the specified path in the form of a Mirage.
 BufferedImage getTileSetImage(String path, Colorization[] zations)
          Returns the raw tileset image with the specified path.
 

Method Detail

getTileSetImage

BufferedImage getTileSetImage(String path,
                              Colorization[] zations)
Returns the raw tileset image with the specified path.

Parameters:
path - the path that identifies the desired image (corresponds to the image path from the tileset).
zations - if non-null, colorizations to apply to the source image before returning it.

getTileImage

Mirage getTileImage(String path,
                    Rectangle bounds,
                    Colorization[] zations)
Obtains the tile image with the specified path in the form of a Mirage. It should be cropped from the tileset image identified by the supplied path.

Parameters:
path - the path that identifies the desired image (corresponds to the image path from the tileset).
bounds - if non-null, the region of the image to be returned as a mirage. If null, the entire image should be returned.
zations - if non-null, colorizations to apply to the image before converting it into a mirage.