Interface ISvgNodeRenderer

    • Method Detail

      • setParent

        void setParent​(ISvgNodeRenderer parent)
        Sets the parent of this renderer. The parent may be the source of inherited properties and default values.
        Parameters:
        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.
        Returns:
        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.
        Parameters:
        context - the object that knows the place to draw this element and maintains its state
      • setAttributesAndStyles

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

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

        void setAttribute​(java.lang.String key,
                          java.lang.String value)
        Sets a property key and value pairs for a given attribute
        Parameters:
        key - the name of the attribute
        value - the value of the attribute
      • getAttributeMapCopy

        java.util.Map<java.lang.String,​java.lang.String> getAttributeMapCopy()
        Get a modifiable copy of the style and attribute map
        Returns:
        copy of the attributes and styles-map
      • createDeepCopy

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

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