Class SVGPaint

java.lang.Object
org.apache.batik.svggen.SVGPaint
All Implemented Interfaces:
XMLConstants, SVGConverter, SVGSyntax, CSSConstants, SVGConstants

public class SVGPaint extends Object implements SVGConverter
Utility class that converts a Paint object into an SVG element.
See Also:
  • Constructor Details

    • SVGPaint

      public SVGPaint(SVGGeneratorContext generatorContext)
      Parameters:
      generatorContext - the context.
  • Method Details

    • getDefinitionSet

      public List getDefinitionSet()
      Specified by:
      getDefinitionSet in interface SVGConverter
      Returns:
      Set of Elements defining the Paints this converter has processed since it was created
    • getTexturePaintConverter

      public SVGTexturePaint getTexturePaintConverter()
    • getGradientPaintConverter

      public SVGLinearGradient getGradientPaintConverter()
    • getCustomPaintConverter

      public SVGCustomPaint getCustomPaintConverter()
    • getColorConverter

      public SVGColor getColorConverter()
    • toSVG

      public SVGDescriptor toSVG(GraphicContext gc)
      Converts part or all of the input GraphicContext into a set of attribute/value pairs and related definitions
      Specified by:
      toSVG in interface SVGConverter
      Parameters:
      gc - GraphicContext to be converted
      Returns:
      descriptor of the attributes required to represent some or all of the GraphicContext state, along with the related definitions
      See Also:
    • toSVG

      public SVGPaintDescriptor toSVG(Paint paint)
      Parameters:
      paint - Paint to be converted to SVG
      Returns:
      a descriptor of the corresponding SVG paint