.. include:: headings.inc .. _AutoBufferedPaintDC: ========================================================================================================================================== |phoenix_title| **AutoBufferedPaintDC** ========================================================================================================================================== This :ref:`DC` derivative can be used inside of an ``EVT_PAINT()`` event handler to achieve double-buffered drawing. Just use this class instead of :ref:`PaintDC` and make sure :meth:`Window.SetBackgroundStyle` is called with ``BG_STYLE_PAINT`` somewhere in the class initialization code, and that's all you have to do to (mostly) avoid flicker. The difference between :ref:`BufferedPaintDC` and this class is that this class won't double-buffer on platforms which have native double-buffering already, avoiding any unnecessary buffering to avoid flicker. :ref:`AutoBufferedPaintDC` is simply a typedef of :ref:`PaintDC` on platforms that have native double-buffering, otherwise, it is a typedef of :ref:`BufferedPaintDC`. .. seealso:: :ref:`DC`, :ref:`BufferedPaintDC`, :ref:`PaintDC` | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **AutoBufferedPaintDC** .. raw:: html

Inheritance diagram of AutoBufferedPaintDC

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~AutoBufferedPaintDC.__init__` Constructor. ================================================================================ ================================================================================ | |api| Class API =============== .. class:: AutoBufferedPaintDC(BufferedPaintDC) This DC derivative can be used inside of an EVT_PAINT() event handler to achieve double-buffered drawing. **Possible constructors**:: AutoBufferedPaintDC(window) .. method:: __init__(self, window) Constructor. Pass a pointer to the window on which you wish to paint. :param `window`: :type `window`: Window