I'm looking to add double buffering to a drawing function like this.
dc = wx.PaintDC(self)
gc = wx.GraphicsContext.Create(dc)
#draw GraphicsPaths to the gc
I tried to first draw to a MemoryDC and then blit that back to the PaintDC:
dc = wx.MemoryDC()
dc.SelectObject(wx.NullBitmap)
gc = wx.GraphicsContext.Create(dc)
#draw GraphicsPaths to the gc
dc2=wx.PaintDC(self)
dc2.Blit(0,0,640,480,dc,0,0)
However, this gives me nothing but a blank screen. Am I misunderstanding how the MemoryDC is supposed to work?