how to draw into a PaintDC and MemoryDC in parallel?
问题 I'm looking for a pice of code, how to use a wx.PaintDC() and wx.MemoryDC in parallel. My wxPython is in version 2.8.12 and I do not get it work to draw to a wx.PaintDC() into a wx.Window, while also having a thread running, that draws to a wx.MemoryDC into a bitmap. Like this: def onPaint(self, evt): self.dc=wx.PaintDC(self) imgbuf, (sx, sy), self.refresh_needed=self.osm.getBitmap() self.dc.DrawBitmap(imgbuf, sx, sy) as_thread() w, h=self.__getBitmapSize() self.bmpbuf=wx.EmptyBitmapRGBA(w, h