X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/432efcb004c8a7f4997acab1aa044c78226c36bb..64ea838d8f4d1853b7d850db93ee565e901d099a:/src/dfb/dcmemory.cpp diff --git a/src/dfb/dcmemory.cpp b/src/dfb/dcmemory.cpp index 036fcb81e1..8929ca41ce 100644 --- a/src/dfb/dcmemory.cpp +++ b/src/dfb/dcmemory.cpp @@ -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$ @@ -19,12 +19,12 @@ // 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/dcmemory.h" +#include "wx/dfb/dcmemory.h" #include "wx/dfb/private.h" // =========================================================================== @@ -32,28 +32,40 @@ // =========================================================================== //----------------------------------------------------------------------------- -// 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) + +void wxMemoryDCImpl::Init() +{ +} + +wxMemoryDCImpl::wxMemoryDCImpl(wxMemoryDC *owner) + : wxDFBDCImpl(owner) +{ + Init(); +} -wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap ) +wxMemoryDCImpl::wxMemoryDCImpl(wxMemoryDC *owner, wxBitmap& bitmap) + : wxDFBDCImpl(owner) { - if ( bitmap.IsOk() ) - SelectObject(bitmap); + Init(); + DoSelect(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; - if ( !bitmap.Ok() ) + if ( !bitmap.IsOk() ) { // select the bitmap out of the DC m_surface = NULL; @@ -61,5 +73,5 @@ void wxMemoryDC::SelectObject(const wxBitmap& bitmap) } // init the DC for drawing to this bitmap - Init(bitmap.GetDirectFBSurface()); + DFBInit(bitmap.GetDirectFBSurface()); }