Interface ISvgNodeRenderer

All Known Subinterfaces:
IBranchSvgNodeRenderer, INoDrawSvgNodeRenderer, ISvgPaintServer, ISvgTextNodeRenderer
All Known Implementing Classes:
AbstractBranchSvgNodeRenderer, AbstractContainerSvgNodeRenderer, AbstractGradientSvgNodeRenderer, AbstractSvgNodeRenderer, CircleSvgNodeRenderer, ClipPathSvgNodeRenderer, DefsSvgNodeRenderer, EllipseSvgNodeRenderer, GroupSvgNodeRenderer, ImageSvgNodeRenderer, LinearGradientSvgNodeRenderer, LineSvgNodeRenderer, MarkerSvgNodeRenderer, PathSvgNodeRenderer, PatternSvgNodeRenderer, PdfRootSvgNodeRenderer, PolygonSvgNodeRenderer, PolylineSvgNodeRenderer, RectangleSvgNodeRenderer, StopSvgNodeRenderer, SvgTagSvgNodeRenderer, SymbolSvgNodeRenderer, TextLeafSvgNodeRenderer, TextSvgBranchRenderer, TextSvgTSpanBranchRenderer, UseSvgNodeRenderer

public interface ISvgNodeRenderer
Interface for SvgNodeRenderer, the renderer draws the SVG to its Pdf-canvas passed in SvgDrawContext, applying styling (CSS and attributes).
  • Method Details

    • setParent

      void setParent (ISvgNodeRenderer parent)
      Sets the parent of this renderer. The parent may be the source of inherited properties and default values.
      parent - the parent renderer
    • getParent

      ISvgNodeRenderer getParent()
      Gets the parent of this renderer. The parent may be the source of inherited properties and default values.
      the parent renderer; null in case of a root node
    • draw

      void draw (SvgDrawContext context)
      Draws this element to a canvas-like object maintained in the context.
      context - the object that knows the place to draw this element and maintains its state
    • setAttributesAndStyles

      void setAttributesAndStyles (Map<String,String> attributesAndStyles)
      Sets the map of XML node attributes and CSS style properties that this renderer needs.
      attributesAndStyles - the mapping from key names to values
    • getAttribute

      String getAttribute (String key)
      Retrieves the property value for a given key name.
      key - the name of the property to search for
      the value for this key, or null
    • setAttribute

      void setAttribute (String key, String value)
      Sets a property key and value pairs for a given attribute
      key - the name of the attribute
      value - the value of the attribute
    • getAttributeMapCopy

      Map<String,String> getAttributeMapCopy()
      Get a modifiable copy of the style and attribute map
      copy of the attributes and styles-map
    • createDeepCopy

      ISvgNodeRenderer createDeepCopy()
      Creates a deep copy of this renderer, including it's subtree of children
      deep copy of this renderer
    • getObjectBoundingBox

      Rectangle getObjectBoundingBox (SvgDrawContext context)
      Calculates the current object bounding box.
      context - the current context, for instance it contains current viewport and available font data
      the Rectangle representing the current object's bounding box, or null if bounding box is undefined