try to use GraphicsContext instead of DC
rewrite MainWindow.py
try to use wx.GraphicsContext in MainWindow.py
recover the MainWindow
recover MainWindow