.. include:: headings.inc .. _BufferedPaintDC: ========================================================================================================================================== |phoenix_title| **BufferedPaintDC** ========================================================================================================================================== This is a subclass of :ref:`BufferedDC` which 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 only thing to watch out for is that if you are using this class together with :ref:`Scrolled`, you probably do **not** want to call :meth:`Scrolled.PrepareDC` on it as it already does this internally for the real underlying :ref:`PaintDC`. .. seealso:: :ref:`DC`, :ref:`BufferedDC`, :ref:`AutoBufferedPaintDC`, :ref:`PaintDC` | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **BufferedPaintDC** .. raw:: html

Inheritance diagram of BufferedPaintDC

| |sub_classes| Known Subclasses ============================== :ref:`AutoBufferedPaintDC` | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~BufferedPaintDC.__init__` As with :ref:`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 used). ================================================================================ ================================================================================ | |api| Class API =============== .. class:: BufferedPaintDC(BufferedDC) This is a subclass of BufferedDC which can be used inside of an EVT_PAINT() event handler to achieve double-buffered drawing. **Possible constructors**:: BufferedPaintDC(window, buffer, style=BUFFER_CLIENT_AREA) BufferedPaintDC(window, style=BUFFER_CLIENT_AREA) .. method:: __init__(self, *args, **kw) As with :ref:`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 used). Pass ``BUFFER_CLIENT_AREA`` for the `style` parameter to indicate that just the client area of the window is buffered, or ``BUFFER_VIRTUAL_AREA`` to indicate that the buffer bitmap covers the virtual area. |overload| **Overloaded Implementations**: **~~~** **__init__** `(self, window, buffer, style=BUFFER_CLIENT_AREA)` :param `window`: :type `window`: Window :param `buffer`: :type `buffer`: Bitmap :param `style`: :type `style`: int **~~~** **__init__** `(self, window, style=BUFFER_CLIENT_AREA)` :param `window`: :type `window`: Window :param `style`: :type `style`: int **~~~**