| java.lang.Object org.vfny.geoserver.wms.responses.ImageUtils
ImageUtils | public class ImageUtils (Code) | | Provides utility methods for the shared handling of images by the raster map
and legend producers.
author: Gabriel Roldan version: $Id$ |
Method Summary | |
public static BufferedImage | createImage(int width, int height, IndexColorModel palette, boolean transparent) Sets up a
BufferedImage.TYPE_4BYTE_ABGR if the paletteInverter is
not provided, or a indexed image otherwise. | public static RenderedImage | forceIndexed8Bitmask(RenderedImage originalImage, InverseColorMapOp invColorMap) | public static Graphics2D | prepareTransparency(boolean transparent, Color bgColor, RenderedImage preparedImage, Map extraHints) Sets up and returns a
Graphics2D for the given
preparedImage , which is already prepared with a
transparent background or the given background color.
Parameters: transparent - whether the graphics is transparent or not. Parameters: bgColor - the background color to fill the graphics with if its nottransparent. Parameters: preparedImage - the image for which to create the graphics. Parameters: extraHints - an optional map of extra rendering hints to apply to theGraphics2D, other thanRenderingHints.KEY_ANTIALIASING. |
createImage | public static BufferedImage createImage(int width, int height, IndexColorModel palette, boolean transparent)(Code) | | Sets up a
BufferedImage.TYPE_4BYTE_ABGR if the paletteInverter is
not provided, or a indexed image otherwise. Subclasses may override this
method should they need a special kind of image
Parameters: width - the width of the image to create. Parameters: height - the height of the image to create. Parameters: paletteInverter - an IndexColorModel if the image is to be indexed, ornull otherwise. an image of size width x height appropriate forthe given color model, if any, and to be used as a transparentimage or not depending on the transparent parameter. |
forceIndexed8Bitmask | public static RenderedImage forceIndexed8Bitmask(RenderedImage originalImage, InverseColorMapOp invColorMap)(Code) | | Parameters: originalImage - |
prepareTransparency | public static Graphics2D prepareTransparency(boolean transparent, Color bgColor, RenderedImage preparedImage, Map extraHints)(Code) | | Sets up and returns a
Graphics2D for the given
preparedImage , which is already prepared with a
transparent background or the given background color.
Parameters: transparent - whether the graphics is transparent or not. Parameters: bgColor - the background color to fill the graphics with if its nottransparent. Parameters: preparedImage - the image for which to create the graphics. Parameters: extraHints - an optional map of extra rendering hints to apply to theGraphics2D, other thanRenderingHints.KEY_ANTIALIASING. a Graphics2D for preparedImage withtransparent background if transparent == true orwith the background painted with bgColor otherwise. |
|
|