def draw(self, dc, f, **key):
dc.SetPen(wx.Pen((255,255,0), width=3, style=wx.SOLID))
dc.SetTextForeground((255,255,0))
font = wx.Font(8, wx.FONTFAMILY_DEFAULT,
wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False)
dc.SetFont(font)
ids = self.graph.nodes()
pts = [self.graph.node[i]['o'] for i in ids]
pts = [f(i[1], i[0]) for i in pts]
dc.DrawPointList(pts)
dc.DrawTextList([str(i) for i in ids], pts)
评论列表
文章目录