wx.BufferedPaintDC

Inheritance diagram for wx.BufferedPaintDC:



Description

This is a subclass of wx.BufferedDC which can be used inside of an OnPaint() event handler.

Just create an object of this class instead of wx.PaintDC and make sure wx.Window.SetBackgroundStyle is called with wx.BG_STYLE_CUSTOM somewhere in the class initialization code, and that’s all you have to do to (mostly) avoid flicker.

The only thing to watch out for is that if you are using this class together with wx.ScrolledWindow, you probably do not want to call PrepareDC on it as it already does this internally for the real underlying wx.PaintDC.

Methods Summary

Class API

Methods

__init__(window, buffer=wx.NullBitmap, style=wx.BUFFER_CLIENT_AREA)

Create a buffered paint DC. As with wx.BufferedDC, you may either provide the bitmap to be used for buffering or let this object create one internally (in the latter case, the size of the client part of the window is automatically used).

Parameters:


Returns:

wx.BufferedPaintDC