Package org.geotools.renderer.style
Class ImageGraphicFactory
- Object
-
- ImageGraphicFactory
-
- All Implemented Interfaces:
ExternalGraphicFactory
,GraphicCache
public class ImageGraphicFactory extends Object implements ExternalGraphicFactory, GraphicCache
External graphic factory accepting an Expression that can be evaluated to a URL pointing to a image file. Theformat
must be one of the mime types supported by the current JDK.- Author:
- Andrea Aime - TOPP
-
-
Constructor Summary
Constructors Constructor Description ImageGraphicFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearCache()
Clear the graphic cache.Icon
getIcon(Feature feature, Expression url, String format, int size)
Turns the specified URL into an Icon, eventually using the Feature attributes to evaluate CQL expressions embedded in the url.
Thesize
parameter defines the size of the image (so that vector based symbols can be drawn at the specified size directly), or may be zero or negative if the size was not specified (in that case the "natural" size of the image will be used, which is the size in pixels for raster images, and 16 for any format that does not have a specific size, according to the SLD spec).
null
will be returned if this factory cannot handle the provided url.Set<String>
getSupportedMimeTypes()
Returs the set of mime types supported by this factorystatic void
resetCache()
Images are cached by the factory, this method can be used to drop the cache
-
-
-
Method Detail
-
getIcon
public Icon getIcon(Feature feature, Expression url, String format, int size)
Description copied from interface:ExternalGraphicFactory
Turns the specified URL into an Icon, eventually using the Feature attributes to evaluate CQL expressions embedded in the url.
Thesize
parameter defines the size of the image (so that vector based symbols can be drawn at the specified size directly), or may be zero or negative if the size was not specified (in that case the "natural" size of the image will be used, which is the size in pixels for raster images, and 16 for any format that does not have a specific size, according to the SLD spec).
null
will be returned if this factory cannot handle the provided url.- Specified by:
getIcon
in interfaceExternalGraphicFactory
-
getSupportedMimeTypes
public Set<String> getSupportedMimeTypes()
Returs the set of mime types supported by this factory
-
resetCache
public static void resetCache()
Images are cached by the factory, this method can be used to drop the cache
-
clearCache
public void clearCache()
Description copied from interface:GraphicCache
Clear the graphic cache.- Specified by:
clearCache
in interfaceGraphicCache
-
-