com.threerings.media.image
Class AWTImageCreator

java.lang.Object
  extended by com.threerings.media.image.AWTImageCreator
All Implemented Interfaces:
ImageManager.OptimalImageCreator

public class AWTImageCreator
extends Object
implements ImageManager.OptimalImageCreator

If the user of the image manager services intends to create and display images using the AWT, they can use this image creator which will use the AWT to determine the optimal image format.


Field Summary
protected  GraphicsConfiguration _gc
          The graphics configuration for the default screen device.
 
Constructor Summary
AWTImageCreator(Component context)
          Create an image creator that will rely on the AWT to determine the optimal image format.
 
Method Summary
 BufferedImage createImage(int width, int height, int trans)
          Requests that a blank image be created that is in a format and of a depth that are optimal for rendering to the screen.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_gc

protected GraphicsConfiguration _gc
The graphics configuration for the default screen device.

Constructor Detail

AWTImageCreator

public AWTImageCreator(Component context)
Create an image creator that will rely on the AWT to determine the optimal image format.

Parameters:
context - if non-null, the graphics configuration will be obtained therefrom; otherwise GraphicsDevice.getDefaultConfiguration() will be used.
Method Detail

createImage

public BufferedImage createImage(int width,
                                 int height,
                                 int trans)
Description copied from interface: ImageManager.OptimalImageCreator
Requests that a blank image be created that is in a format and of a depth that are optimal for rendering to the screen.

Specified by:
createImage in interface ImageManager.OptimalImageCreator