Class AbstractSVGConverter

java.lang.Object
org.apache.batik.svggen.AbstractSVGConverter
All Implemented Interfaces:
XMLConstants, ErrorConstants, SVGConverter, SVGSyntax, CSSConstants, SVGConstants
Direct Known Subclasses:
SVGAlphaComposite, SVGBasicStroke, SVGClip, SVGColor, SVGCustomComposite, SVGCustomPaint, SVGFont, SVGLinearGradient, SVGRenderingHints, SVGTexturePaint, SVGTransform

public abstract class AbstractSVGConverter extends Object implements SVGConverter, ErrorConstants
Abstract class with common utility methods used by subclasses for specific convertion operations. It holds a reference to a domFactory Document, which many implementations use, and provides a convenience method, to offers a convertion of double values to String that remove the trailing '.' character on integral values.
  • Field Details

    • generatorContext

      protected SVGGeneratorContext generatorContext
      Used by converters to create Elements and other DOM objects
    • descMap

      protected Map descMap
      Map of descriptions already processed by this converter. The key type is left to the implementations
    • defSet

      protected List defSet
      Set of definitions to interpret the values of the attributes generated by this converter since its creation
  • Constructor Details

    • AbstractSVGConverter

      public AbstractSVGConverter(SVGGeneratorContext generatorContext)
      Parameters:
      generatorContext - can be used by the SVGConverter extensions to create Elements and other types of DOM objects.
  • Method Details

    • getDefinitionSet

      public List getDefinitionSet()
      Specified by:
      getDefinitionSet in interface SVGConverter
      Returns:
      set of definitions referenced by the attribute values created by the implementation since its creation. The return value should never be null. If no definition is needed, an empty set should be returned.
    • doubleString

      public final String doubleString(double value)
      Utility method for subclasses.