wx.AutoBufferedPaintDC

Inheritance diagram for wx.AutoBufferedPaintDC:



Description

This wx.DC derivative can be used inside of an OnPaint() event handler to achieve double-buffered drawing.

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 difference between wx.BufferedPaintDC and this class, is the lightweigthness - on platforms which have native double-buffering, wx.AutoBufferedPaintDC is simply a typedef of wx.PaintDC. Otherwise, it is a typedef of wx.BufferedPaintDC.

Methods Summary

Class API

Methods

__init__(win)

If the current platform double buffers by default then this DC is the same as a plain wx.PaintDC, otherwise it is a wx.BufferedPaintDC .

Parameters:


Returns:

wx.AutoBufferedPaintDC