]> git.saurik.com Git - wxWidgets.git/commitdiff
call Init() from wxBufferedDC ctors to ensure that layout direction is inherited...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 22 Oct 2006 13:04:28 +0000 (13:04 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 22 Oct 2006 13:04:28 +0000 (13:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42238 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/dcbuffer.h

index 4c0b1e954a27386f2ee1327cf3ee2a52e220b6b3..6e26da6f97e7bdcabac812949b2e1c4149cef4ca 100644 (file)
@@ -50,29 +50,25 @@ public:
 
     // Construct a wxBufferedDC using a user supplied buffer.
     wxBufferedDC(wxDC *dc,
-                 const wxBitmap &buffer = wxNullBitmap,
+                 const wxBitmapbuffer = wxNullBitmap,
                  int style = wxBUFFER_CLIENT_AREA)
-        : m_dc(dc),
-          m_buffer(&buffer),
-          m_style(style)
+        : m_dc(NULL),
+          m_buffer(NULL)
     {
-        UseBuffer();
+        Init(dc, buffer, style);
     }
 
     // Construct a wxBufferedDC with an internal buffer of 'area'
     // (where area is usually something like the size of the window
     // being buffered)
-    wxBufferedDC(wxDC *dc, const wxSize &area, int style = wxBUFFER_CLIENT_AREA)
-        : m_dc(dc),
-          m_buffer(NULL),
-          m_style(style)
+    wxBufferedDC(wxDC *dc, const wxSize& area, int style = wxBUFFER_CLIENT_AREA)
+        : m_dc(NULL),
+          m_buffer(NULL)
 
     {
-        UseBuffer(area.x, area.y);
+        Init(dc, area, style);
     }
 
-    // default copy ctor ok.
-
     // The usually desired  action in the dtor is to blit the buffer.
     virtual ~wxBufferedDC()
     {
@@ -80,8 +76,7 @@ public:
             UnMask();
     }
 
-    // These reimplement the actions of the ctors for two stage creation, but
-    // are not used by the ctors themselves to save a few cpu cycles.
+    // These reimplement the actions of the ctors for two stage creation
     void Init(wxDC *dc,
               const wxBitmap& buffer = wxNullBitmap,
               int style = wxBUFFER_CLIENT_AREA)
@@ -270,6 +265,5 @@ inline wxDC* wxAutoBufferedPaintDCFactory(wxWindow* window)
     else
         return new wxBufferedPaintDC(window);
 }
-            
 
 #endif  // _WX_DCBUFFER_H_