def get_graph(self): title = self.suite + ': runtime inheritance graph' graph = CGraphPlain(title) graph.set_def_style( gtk_rgb_to_hex(getattr(self.style, 'fg', None)[gtk.STATE_NORMAL]), gtk_rgb_to_hex(getattr(self.style, 'bg', None)[gtk.STATE_NORMAL])) graph.graph_attr['rankdir'] = self.orientation for ns in self.inherit: for p in self.inherit[ns]: graph.add_edge(p, ns) graph.get_node(p).attr['shape'] = 'box' graph.get_node(ns).attr['shape'] = 'box' self.graph = graph self.filter_graph() self.set_dotcode(graph.string())
def get_graph(self): title = self.suite + ': runtime inheritance graph' graph = CGraphPlain(title) graph.graph_attr['rankdir'] = self.orientation for ns in self.inherit: for p in self.inherit[ns]: attr = {} attr['color'] = 'royalblue' graph.add_edge(p, ns, **attr) nl = graph.get_node(p) nr = graph.get_node(ns) for n in nl, nr: n.attr['shape'] = 'box' n.attr['style'] = 'filled' n.attr['fillcolor'] = 'powderblue' n.attr['color'] = 'royalblue' self.graph = graph self.filter_graph() self.set_dotcode(graph.string())