def drawCenterPolygon(self, gc):
"""Draw the polygon at the center of the pie menu.
"""
gc.PushState()
# set border and fill colors
gc.SetPen(wx.Pen((80,80,80), 2))
gc.SetBrush(wx.Brush((0,0,0)))
# radius of circle that circumscribes the polygon
radius = 0.1 * self.winRadius
points = radius * np.array((np.cos(self.angles), np.sin(self.angles))).T
# draw the polygon
gc.DrawLines(points)
gc.PopState()
评论列表
文章目录