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.
  • 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