1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
|
.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2018 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. _wx.AutoBufferedPaintDC:
==========================================================================================================================================
|phoenix_title| **wx.AutoBufferedPaintDC**
==========================================================================================================================================
This :ref:`wx.DC` derivative can be used inside of an ``EVT_PAINT()`` event handler to achieve double-buffered drawing.
Just use this class instead of :ref:`wx.PaintDC` and make sure :meth:`wx.Window.SetBackgroundStyle` is called with ``wx.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:`wx.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:`wx.AutoBufferedPaintDC` is simply a typedef of :ref:`wx.PaintDC` on platforms that have native double-buffering, otherwise, it is a typedef of :ref:`wx.BufferedPaintDC`.
.. seealso:: :ref:`wx.DC`, :ref:`wx.BufferedPaintDC`, :ref:`wx.PaintDC`
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html
<div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
<img id="toggleBlock-trigger" src="_static/images/closed.png"/>
Inheritance diagram for class <strong>AutoBufferedPaintDC</strong>:
</div>
<div id="toggleBlock-summary" style="display:block;"></div>
<div id="toggleBlock-content" style="display:none;">
<p class="graphviz">
<center><img src="_static/images/inheritance/wx.AutoBufferedPaintDC_inheritance.png" alt="Inheritance diagram of AutoBufferedPaintDC" usemap="#dummy" class="inheritance"/></center>
</div>
<script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
<map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.Object.html" title="wx.Object" alt="" coords="52,5,133,35"/> <area shape="rect" id="node3" href="wx.DC.html" title="wx.DC" alt="" coords="57,83,129,112"/> <area shape="rect" id="node2" href="wx.MemoryDC.html" title="wx.MemoryDC" alt="" coords="37,160,149,189"/> <area shape="rect" id="node5" href="wx.BufferedDC.html" title="wx.BufferedDC" alt="" coords="36,237,151,267"/> <area shape="rect" id="node4" href="wx.BufferedPaintDC.html" title="wx.BufferedPaintDC" alt="" coords="20,315,167,344"/> <area shape="rect" id="node6" href="wx.AutoBufferedPaintDC.html" title="wx.AutoBufferedPaintDC" alt="" coords="5,392,181,421"/> </map>
</p>
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.AutoBufferedPaintDC.__init__` Constructor.
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.AutoBufferedPaintDC(DC)
**Possible constructors**::
AutoBufferedPaintDC(window)
This DC derivative can be used inside of an EVT_PAINT() event
handler to achieve double-buffered drawing.
.. method:: __init__(self, window)
Constructor.
Pass a pointer to the window on which you wish to paint.
:param `window`:
:type `window`: wx.Window
|