summaryrefslogtreecommitdiff
path: root/lib/wx/doc/src/wxBufferedDC.xml
blob: f32f42023aff66ffc9df66d7205ca575d2692ee7 (plain)
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
<?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>
    <holder>Ericsson AB. All Rights Reserved.</holder></copyright>
  <legalnotice>
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.

  </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>