Class SVGGraphicContext

java.lang.Object
org.apache.batik.svggen.SVGGraphicContext
All Implemented Interfaces:
XMLConstants, ErrorConstants, CSSConstants, SVGConstants

public class SVGGraphicContext extends Object implements SVGConstants, ErrorConstants
Represents the SVG equivalent of a Java 2D API graphic context attribute.
Version:
$Id: SVGGraphicContext.java 1733416 2016-03-03 07:07:13Z gadams $
  • Field Details

    • leafOnlyAttributes

      private static final String[] leafOnlyAttributes
    • defaultValues

      private static final String[] defaultValues
    • context

      private Map context
    • groupContext

      private Map groupContext
    • graphicElementContext

      private Map graphicElementContext
    • transformStack

      private TransformStackElement[] transformStack
  • Constructor Details

    • SVGGraphicContext

      public SVGGraphicContext(Map context, TransformStackElement[] transformStack)
      Parameters:
      context - Set of style attributes in this context.
      transformStack - Sequence of transforms that where applied to create the context's current transform.
    • SVGGraphicContext

      public SVGGraphicContext(Map groupContext, Map graphicElementContext, TransformStackElement[] transformStack)
      Parameters:
      groupContext - Set of attributes that apply to group
      graphicElementContext - Set of attributes that apply to elements but not to groups (e.g., opacity, filter).
      transformStack - Sequence of transforms that where applied to create the context's current transform.
  • Method Details

    • getContext

      public Map getContext()
      Returns:
      set of all attributes.
    • getGroupContext

      public Map getGroupContext()
      Returns:
      set of attributes that can be set on a group
    • getGraphicElementContext

      public Map getGraphicElementContext()
      Returns:
      set of attributes that can be set on leaf node
    • getTransformStack

      public TransformStackElement[] getTransformStack()
      Returns:
      set of TransformStackElement for this context
    • computeContext

      private void computeContext()
    • computeGroupAndGraphicElementContext

      private void computeGroupAndGraphicElementContext()