renderers Package

renderers Package

Home of the code which knows how to actually draw a graph which has been layed out.

class visgraph.renderers.GraphRenderer(graph)[source]

Only a “renderer” knows how big each node will end up based on metadata in the graph which is specific to the renderer.

All renderers should be able to set the (x,y) “size” tuple

beginRender(width, height)[source]
endRender()[source]
renderEdge(eid, einfo, points)[source]

Render an edge in the graph by drawing lines between all the listed points (as (x,y) tuples...)

renderNode(nid, ninfo, xpos, ypos)[source]

Render the given node at the specified position.

setNodeSizes(graph)[source]

Calculate the sizes for each node based on graph metadata (or defaults)

gtkrend Module

qgraphtree Module

class visgraph.renderers.qgraphtree.NodeColumn(vg, nodes, scene, left=None, right=None)[source]

Bases: PyQt4.QtGui.QGraphicsItem

boundingRect()[source]
drawLinesFrom(colnode)[source]

Draw lines from our nodes to the specified one (used when we are on the left...)

drawLinesTo(colnode)[source]

Draw lines to our nodes from the specified one (used when we are on the right...)

expandNode(colnode)[source]
getLeftBoundary()[source]
getRightBoundary()[source]
getYMid()[source]
paint(x, y, z)[source]
removeColumn()[source]
takeOverView()[source]
class visgraph.renderers.qgraphtree.QGraphNode(column, nid, nprops, scene=None)[source]

Bases: PyQt4.QtGui.QGraphicsSimpleTextItem

contextMenuEvent(event)[source]
mousePressEvent(event)[source]
class visgraph.renderers.qgraphtree.QGraphTreeView(vg, nodes, parent=None)[source]

Bases: PyQt4.QtGui.QGraphicsView

loadNewGraph(vg, nodes)[source]

svgrend Module

class visgraph.renderers.svgrend.SvgGraphRenderer(graph, svgfile)[source]

Bases: visgraph.renderers.GraphRenderer

beginRender(xsize, ysize)[source]
endRender()[source]
renderEdge(eid, einfo, points)[source]
renderNode(nid, ninfo, xpos, ypos)[source]
setNodeSizes(graph)[source]

Table Of Contents

This Page