Class SVGSpatialSource
- java.lang.Object
-
- repast.simphony.visualizationOGL2D.SVGSpatialSource
-
- All Implemented Interfaces:
SpatialSource
- Direct Known Subclasses:
ReLogoSVGSpatialSource
public class SVGSpatialSource extends Object implements SpatialSource
Registers spatials from an SVG spatial source. If the svg contains keyword metadata of "simple" then, this will attempt to create geometry and color info from the svg, otherwise it will render the svg as an image.- Author:
- Nick Collier
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
simple
-
Fields inherited from interface repast.simphony.visualizationOGL2D.SpatialSource
KEY_BSQUARE_SIZE, KEY_HEIGHT, KEY_SCALE, KEY_WIDTH
-
-
Constructor Summary
Constructors Constructor Description SVGSpatialSource(String id, String path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getID()
Gets the unique name for this source.protected void
parseProps(String path)
void
registerSource(saf.v3d.ShapeFactory2D shapeFactory, Map<String,String> props)
Registers this source with ShapeFactory2D.
-
-
-
Constructor Detail
-
SVGSpatialSource
public SVGSpatialSource(String id, String path) throws IOException
- Throws:
IOException
-
-
Method Detail
-
parseProps
protected void parseProps(String path) throws IOException
- Throws:
IOException
-
getID
public String getID()
Description copied from interface:SpatialSource
Gets the unique name for this source.- Specified by:
getID
in interfaceSpatialSource
- Returns:
- the unique name for this source.
-
registerSource
public void registerSource(saf.v3d.ShapeFactory2D shapeFactory, Map<String,String> props) throws IOException
Description copied from interface:SpatialSource
Registers this source with ShapeFactory2D. After registering the source VSpatials can be retreived by name from the ShapeFactory2D.- Specified by:
registerSource
in interfaceSpatialSource
props
- a map containing properties (SpatialSource.WIDTH, etc.) that can be used in registering the source- Throws:
IOException
-
-