def draw(self, dc, printerScale, coord=None):
colour = self.attributes['colour']
width = self.attributes['width'] * printerScale * self._pointSize[0]
style = self.attributes['style']
if not isinstance(colour, wx.Colour):
if IsNotWX4():
colour = wx.NamedColour(colour)
else:
colour = wx.Colour(colour)
pen = wx.Pen(colour, width, style)
pen.SetCap(wx.CAP_BUTT)
dc.SetPen(pen)
if coord is None:
if len(self.scaled): # bugfix for Mac OS X
dc.DrawLines(self.scaled)
else:
dc.DrawLines(coord) # draw legend line
评论列表
文章目录