org.apache.batik.svggen

Class SVGShape

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.
Constructor Summary
SVGShape(SVGGeneratorContext generatorContext)
Method Summary
ElementtoSVG(Shape shape)

Constructor Detail

SVGShape

public SVGShape(SVGGeneratorContext generatorContext)

Parameters: generatorContext used to build Elements

Method Detail

toSVG

public Element toSVG(Shape shape)

Parameters: shape Shape object to be converted

Copyright B) 2007 Apache Software Foundation. All Rights Reserved.