mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-07 04:20:07 +01:00
13 lines
339 B
Python
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))
|