]> git.saurik.com Git - wxWidgets.git/blobdiff - src/dfb/dcmemory.cpp
convert wxImage's mask into alpha channel in wxDFB's wxBitmap for now, until full...
[wxWidgets.git] / src / dfb / dcmemory.cpp
index 036fcb81e108287e965a9c9f3fcdf4877386c071..4f274d960cec7c21a45b4ac534a31b529788234c 100644 (file)
@@ -1,6 +1,6 @@
 /////////////////////////////////////////////////////////////////////////////
 // Name:        src/dfb/dcmemory.cpp
-// Purpose:     wxMemoryDC implementation
+// Purpose:     wxMemoryDCImpl implementation
 // Author:      Vaclav Slavik
 // Created:     2006-08-16
 // RCS-ID:      $Id$
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
-#include "wx/dcmemory.h"
-
 #ifndef WX_PRECOMP
     #include "wx/bitmap.h"
 #endif
 
+#include "wx/dfb/dcmemory.h"
 #include "wx/dfb/private.h"
 
 // ===========================================================================
 // ===========================================================================
 
 //-----------------------------------------------------------------------------
-// wxMemoryDC
+// wxMemoryDCImpl
 //-----------------------------------------------------------------------------
 
-#warning "FIXME: verify/fix that wxMemoryDC works correctly with mono bitmaps"
+#warning "FIXME: verify/fix that wxMemoryDCImpl works correctly with mono bitmaps"
 
-IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC)
+IMPLEMENT_ABSTRACT_CLASS(wxMemoryDCImpl, wxDFBDCImpl)
 
-wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap )
+void wxMemoryDCImpl::Init()
 {
-    if ( bitmap.IsOk() )
-        SelectObject(bitmap);
 }
 
-wxMemoryDC::wxMemoryDC(wxDC *WXUNUSED(dc))
+wxMemoryDCImpl::wxMemoryDCImpl(wxMemoryDC *owner, wxDC *WXUNUSED(dc))
+              : wxDFBDCImpl(owner)
 {
 }
 
-void wxMemoryDC::SelectObject(const wxBitmap& bitmap)
+void wxMemoryDCImpl::DoSelect(const wxBitmap& bitmap)
 {
     m_bmp = bitmap;
 
@@ -61,5 +59,5 @@ void wxMemoryDC::SelectObject(const wxBitmap& bitmap)
     }
 
     // init the DC for drawing to this bitmap
-    Init(bitmap.GetDirectFBSurface());
+    DFBInit(bitmap.GetDirectFBSurface());
 }