org.geotools.renderer.style
Class SVGGraphicFactory
Object
SVGGraphicFactory
- All Implemented Interfaces:
- ExternalGraphicFactory
public class SVGGraphicFactory
- extends Object
- implements ExternalGraphicFactory
External graphic factory accepting an Expression that can be evaluated to a URL pointing to a SVG
file. The format
must be image/svg+xml
, thought for backwards
compatibility image/svg-xml
and image/svg
are accepted as well.
- Author:
- Andrea Aime - TOPP
- Module:
Method Summary |
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. |
static void |
resetCache()
Forcefully drops the SVG cache |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SVGGraphicFactory
public SVGGraphicFactory()
getIcon
public Icon getIcon(Feature feature,
Expression url,
String format,
int size)
throws Exception
- 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.
The size
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 interface ExternalGraphicFactory
- Throws:
Exception
resetCache
public static void resetCache()
- Forcefully drops the SVG cache
Copyright © 1996-2010 Geotools. All Rights Reserved.