Class SVGRectangle

All Implemented Interfaces:
XMLConstants, SVGSyntax, CSSConstants, SVGConstants

public class SVGRectangle extends SVGGraphicObjectConverter
Utility class that converts a Rectangle2D or RoundRectangle2D object into an SVG element.
Version:
$Id: SVGRectangle.java 1733416 2016-03-03 07:07:13Z gadams $
  • Field Details

    • svgLine

      private SVGLine svgLine
      Line converter used for degenerate cases
  • Constructor Details

    • SVGRectangle

      public SVGRectangle(SVGGeneratorContext generatorContext)
      Parameters:
      generatorContext - used to build Elements
  • Method Details

    • toSVG

      public Element toSVG(Rectangle2D rect)
      Parameters:
      rect - rectangle object to convert to SVG
    • toSVG

      public Element toSVG(RoundRectangle2D rect)
      In the Java 2D API, arc width/height are used as absolute values.
      Parameters:
      rect - rectangle object to convert to SVG
    • toSVG

      private Element toSVG(RectangularShape rect)
      Parameters:
      rect - rectangle object to convert to SVG