SUMMARY:
java.lang.Object
org.apache.batik.svggen.SVGGraphicObjectConverter
org.apache.batik.svggen.SVGShape
- All Implemented Interfaces:
- SVGSyntax, CSSConstants, SVGConstants, XMLConstants
public class SVGShape
- extends SVGGraphicObjectConverter
Utility class that converts a Shape object into the corresponding
SVG element. Note that this class analyzes the input Shape class
to generate the most appropriate corresponding SVG element:
+ Polygon is mapped to polygon
+ Rectangle2D and RoundRectangle2D are mapped to rect
+ Ellipse2D is mapped to circle or ellipse
+ Line2D is mapped to line
+ Arc2D, CubicCurve2D, Area, GeneralPath and QuadCurve2D are mapped to
path.
+ Any custom Shape implementation is mapped to path as well.
SVGShape
public SVGShape(SVGGeneratorContext generatorContext)
- Parameters:
generatorContext
- used to build Elements
toSVG
public org.w3c.dom.Element toSVG(java.awt.Shape shape)
- Parameters:
shape
- Shape object to be converted