<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<!-- THIS FILE IS GENERATED DO NOT EDIT -->


<erlref>
<header>
  <copyright>
    <year>2020</year><year>2021</year>
    <holder>wxWidgets team.</holder></copyright>
  <legalnotice>Licensed under the wxWindows Free Documentation Licence, Version 3
  </legalnotice>
  <title>wxBufferedDC</title>
</header>
<module>wxBufferedDC</module>
<modulesummary>Functions for wxBufferedDC class</modulesummary>
<description><p>This class provides a simple way to avoid flicker: when drawing on it, everything is in fact first drawn on an in-memory buffer (a <seeerl marker="wxBitmap"><c>wxBitmap</c></seeerl>) and then copied to the screen, using the associated <seeerl marker="wxDC"><c>wxDC</c></seeerl>, only once, when this object is destroyed. <seeerl marker="wxBufferedDC"><c>wxBufferedDC</c></seeerl> itself is typically associated with <seeerl marker="wxClientDC"><c>wxClientDC</c></seeerl>, if you want to use it in your <c>EVT_PAINT</c> handler, you should look at <seeerl marker="wxBufferedPaintDC"><c>wxBufferedPaintDC</c></seeerl> instead.
      </p><p>When used like this, a valid <c>DC</c> must be specified in the constructor while the <c>buffer</c> bitmap doesn't have to be explicitly provided, by default this class will allocate the bitmap of required size itself. However using a dedicated bitmap can speed up the redrawing process by eliminating the repeated creation and destruction of a possibly big bitmap. Otherwise, <seeerl marker="wxBufferedDC"><c>wxBufferedDC</c></seeerl> can be used in the same way as any other device context.
      </p><p>Another possible use for <seeerl marker="wxBufferedDC"><c>wxBufferedDC</c></seeerl> is to use it to maintain a backing store for the window contents. In this case, the associated <c>DC</c> may be NULL but a valid backing store bitmap should be specified.
      </p><p>Finally, please note that GTK+ 2.0 as well as macOS provide double buffering themselves natively. You can either use <seemfa marker="wxWindow#isDoubleBuffered/1"><c>wxWindow:isDoubleBuffered/1</c></seemfa> to determine whether you need to use buffering or not, or use <c>wxAutoBufferedPaintDC</c> (not implemented in wx) to avoid needless double buffering on the systems which already do it automatically.
      </p><p>See: <seeerl marker="wxDC"><c>wxDC</c></seeerl>, <seeerl marker="wxMemoryDC"><c>wxMemoryDC</c></seeerl>, <seeerl marker="wxBufferedPaintDC"><c>wxBufferedPaintDC</c></seeerl>, <c>wxAutoBufferedPaintDC</c> (not implemented in wx)
      </p>
  <p>This class is derived (and can use functions) from: 
    <seeerl marker="wxMemoryDC"><c>wxMemoryDC</c></seeerl> <seeerl marker="wxDC"><c>wxDC</c></seeerl></p>
  
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_buffered_d_c.html">wxBufferedDC</url></p>
  </description>
<datatypes><datatype><name name="wxBufferedDC"/></datatype></datatypes>

<funcs>
  <func>
    <name name="new" arity="0" clause_i="1" since=""/>
    <fsummary>Default constructor. </fsummary>
    <desc><p>Default constructor. 
      </p><p>You must call one of the <seemfa marker="#init/4"><c>init/4</c></seemfa> methods later in order to use the device context. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>new/2</c></fsummary>
  </func>
  
  <func>
    <name name="new" arity="2" clause_i="1" since=""/>
  
    <name name="new" arity="2" clause_i="2" since=""/>
    <fsummary>Creates a buffer for the provided dc. </fsummary>
    <desc><p>Creates a buffer for the provided dc. 
      </p><p><seemfa marker="#init/4"><c>init/4</c></seemfa> must not be called when using this constructor.
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="3" clause_i="1" since=""/>
    <fsummary>Creates a buffer for the provided <c>dc</c>. </fsummary>
    <desc><p>Creates a buffer for the provided <c>dc</c>. 
      </p><p><seemfa marker="#init/4"><c>init/4</c></seemfa> must not be called when using this constructor.
      </p></desc>
  </func>
  
  <func>
    <name name="destroy" arity="1" clause_i="1" since=""/>
    <fsummary>Copies everything drawn on the DC so far to the underlying DC associated with this object, if any. </fsummary>
    <desc><p>Copies everything drawn on the DC so far to the underlying DC associated with this object, if any. 
      </p></desc>
  </func>
  
  <func>
    <name name="init" arity="2" clause_i="1" since=""/>
    <fsummary>See: <c>init/3</c></fsummary>
  </func>
  
  <func>
    <name name="init" arity="3" clause_i="1" since=""/>
  
    <name name="init" arity="3" clause_i="2" since=""/>
    <fsummary/>
    <desc/>
  </func>
  
  <func>
    <name name="init" arity="4" clause_i="1" since=""/>
    <fsummary>Initializes the object created using the default constructor. </fsummary>
    <desc><p>Initializes the object created using the default constructor. 
      </p><p>Please see the constructors for parameter details. 
      </p></desc>
  </func>
  </funcs>
</erlref>
