def Clear(self):
"""Erase the window."""
self.last_PointLabel = None # reset pointLabel
dc = wx.BufferedDC(wx.ClientDC(self.canvas), self._Buffer)
bbr = wx.Brush(self.GetBackgroundColour(), wx.SOLID)
dc.SetBackground(bbr)
dc.SetBackgroundMode(wx.SOLID)
dc.Clear()
if self._antiAliasingEnabled:
try:
dc = wx.GCDC(dc)
except Exception:
pass
dc.SetTextForeground(self.GetForegroundColour())
dc.SetTextBackground(self.GetBackgroundColour())
self.last_draw = None
评论列表
文章目录