1wxBufferedDC(3)            Erlang Module Definition            wxBufferedDC(3)
2
3
4

NAME

6       wxBufferedDC - Functions for wxBufferedDC class
7

DESCRIPTION

9       This  class provides a simple way to avoid flicker: when drawing on it,
10       everything is in fact first drawn on an in-memory buffer  (a  wxBitmap)
11       and  then  copied  to the screen, using the associated wxDC, only once,
12       when this object is destroyed. wxBufferedDC itself is typically associ‐
13       ated  with wxClientDC, if you want to use it in your EVT_PAINT handler,
14       you should look at wxBufferedPaintDC instead.
15
16       When used like this, a valid DC must be specified  in  the  constructor
17       while  the buffer bitmap doesn't have to be explicitly provided, by de‐
18       fault this class will allocate the bitmap of required size itself. How‐
19       ever  using  a  dedicated  bitmap can speed up the redrawing process by
20       eliminating the repeated creation and destruction  of  a  possibly  big
21       bitmap.  Otherwise,  wxBufferedDC  can  be  used in the same way as any
22       other device context.
23
24       Another possible use for wxBufferedDC is to use it to maintain a  back‐
25       ing  store for the window contents. In this case, the associated DC may
26       be NULL but a valid backing store bitmap should be specified.
27
28       Finally, please note that GTK+ 2.0 as  well  as  macOS  provide  double
29       buffering  themselves  natively.  You can either use wxWindow:isDouble‐
30       Buffered/1 to determine whether you need to use buffering  or  not,  or
31       use  wxAutoBufferedPaintDC  (not  implemented  in wx) to avoid needless
32       double buffering on the systems which already do it automatically.
33
34       See: wxDC, wxMemoryDC,  wxBufferedPaintDC,  wxAutoBufferedPaintDC  (not
35       implemented in wx)
36
37       This class is derived (and can use functions) from: wxMemoryDC wxDC
38
39       wxWidgets docs: wxBufferedDC
40

DATA TYPES

42       wxBufferedDC() = wx:wx_object()
43

EXPORTS

45       new() -> wxBufferedDC()
46
47              Default constructor.
48
49              You  must  call  one of the init/4 methods later in order to use
50              the device context.
51
52       new(Dc) -> wxBufferedDC()
53
54              Types:
55
56                 Dc = wxDC:wxDC()
57
58       new(Dc, Area) -> wxBufferedDC()
59
60       new(Dc, Area :: [Option]) -> wxBufferedDC()
61
62              Types:
63
64                 Dc = wxDC:wxDC()
65                 Option = {buffer, wxBitmap:wxBitmap()} | {style, integer()}
66
67              Creates a buffer for the provided dc.
68
69              init/4 must not be called when using this constructor.
70
71       new(Dc, Area, Options :: [Option]) -> wxBufferedDC()
72
73              Types:
74
75                 Dc = wxDC:wxDC()
76                 Area = {W :: integer(), H :: integer()}
77                 Option = {style, integer()}
78
79              Creates a buffer for the provided dc.
80
81              init/4 must not be called when using this constructor.
82
83       destroy(This :: wxBufferedDC()) -> ok
84
85              Copies everything drawn on the DC so far to  the  underlying  DC
86              associated with this object, if any.
87
88       init(This, Dc) -> ok
89
90              Types:
91
92                 This = wxBufferedDC()
93                 Dc = wxDC:wxDC()
94
95       init(This, Dc, Area) -> ok
96
97       init(This, Dc, Area :: [Option]) -> ok
98
99              Types:
100
101                 This = wxBufferedDC()
102                 Dc = wxDC:wxDC()
103                 Option = {buffer, wxBitmap:wxBitmap()} | {style, integer()}
104
105       init(This, Dc, Area, Options :: [Option]) -> ok
106
107              Types:
108
109                 This = wxBufferedDC()
110                 Dc = wxDC:wxDC()
111                 Area = {W :: integer(), H :: integer()}
112                 Option = {style, integer()}
113
114              Initializes the object created using the default constructor.
115
116              Please see the constructors for parameter details.
117
118
119
120wxWidgets team.                     wx 2.1                     wxBufferedDC(3)
Impressum