Class SVGGraphRenderer

  • Direct Known Subclasses:
    SVGTreeRenderer

    public abstract class SVGGraphRenderer
    extends Object
    This is the abstract base class for rendering an SVG graph out of the basic Graph description.
    Author:
    mhschroe
    • Field Detail

      • width

        protected final int width
      • height

        protected final int height
    • Constructor Detail

      • SVGGraphRenderer

        public SVGGraphRenderer​(Graph<SVGNode> graph,
                                int width,
                                int height)
    • Method Detail

      • render

        public Document render()
        This method renders the graph as a full SVG 1.1 document.

        Override this method if you don't want the default SVG 1.1 header

        Returns:
        an SVG 1.1 document containing the graph.
      • getElements

        public abstract Collection<SVGPrimitive> getElements()
        This method returns all drawables defined by the current graph.
        Returns:
        the SVGPrimitives that should go below the <svg> root.