Files
Phoenix/docs/sphinx/rest_substitutions/snippets/python/converted/wx.MemoryDC.3.py
2022-08-06 11:40:10 -07:00

13 lines
339 B
Python

class MyWindow(wx.Window):
...
def OnPaint(self, event):
bmp = wx.Bitmap();
bmp.CreateWithDIPSize(self.GetClientSize(), self.GetDPIScaleFactor())
memdc = wx.MemoryDC(bmp)
... use memdc to draw on the bitmap ...
dc = wx.PaintDC(self)
dc.DrawBitmap(bmp, wx.Point(0, 0))