Class SVGClip

All Implemented Interfaces:
XMLConstants, ErrorConstants, SVGConverter, SVGSyntax, CSSConstants, SVGConstants

public class SVGClip extends AbstractSVGConverter
Utility class that converts a Path object into an SVG clip
Version:
$Id: SVGClip.java 1733416 2016-03-03 07:07:13Z gadams $
  • Field Details

    • ORIGIN

      public static final Shape ORIGIN
      Constant used for some degenerate cases
    • NO_CLIP

      public static final SVGClipDescriptor NO_CLIP
      Descriptor to use where there is no clip on an element
    • shapeConverter

      private SVGShape shapeConverter
      Used to convert clip object to SVG elements
  • Constructor Details

    • SVGClip

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

    • toSVG

      public SVGDescriptor toSVG(GraphicContext gc)
      Converts part or all of the input GraphicContext into a set of attribute/value pairs and related definitions.
      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:
    • clipToSVG

      private Element clipToSVG(Shape clip)
      In the following method, an clipping Shape is converted to an SVG clipPath.
      Parameters:
      clip - path to convert to an SVG clipPath element