fixed wxDFB compilation after wxDC-related changes
[wxWidgets.git] / src / dfb / dcmemory.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/dfb/dcmemory.cpp
3 // Purpose: wxMemoryDCImpl implementation
4 // Author: Vaclav Slavik
5 // Created: 2006-08-16
6 // RCS-ID: $Id$
7 // Copyright: (c) 2006 REA Elektronik GmbH
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 // ===========================================================================
12 // declarations
13 // ===========================================================================
14
15 // ---------------------------------------------------------------------------
16 // headers
17 // ---------------------------------------------------------------------------
18
19 // For compilers that support precompilation, includes "wx.h".
20 #include "wx/wxprec.h"
21
22 #ifndef WX_PRECOMP
23 #include "wx/bitmap.h"
24 #endif
25
26 #include "wx/dfb/dcmemory.h"
27 #include "wx/dfb/private.h"
28
29 // ===========================================================================
30 // implementation
31 // ===========================================================================
32
33 //-----------------------------------------------------------------------------
34 // wxMemoryDCImpl
35 //-----------------------------------------------------------------------------
36
37 #warning "FIXME: verify/fix that wxMemoryDCImpl works correctly with mono bitmaps"
38
39 IMPLEMENT_ABSTRACT_CLASS(wxMemoryDCImpl, wxDFBDCImpl)
40
41 void wxMemoryDCImpl::Init()
42 {
43 }
44
45 wxMemoryDCImpl::wxMemoryDCImpl(wxMemoryDC *owner, wxDC *WXUNUSED(dc))
46 : wxDFBDCImpl(owner)
47 {
48 }
49
50 void wxMemoryDCImpl::DoSelect(const wxBitmap& bitmap)
51 {
52 m_bmp = bitmap;
53
54 if ( !bitmap.Ok() )
55 {
56 // select the bitmap out of the DC
57 m_surface = NULL;
58 return;
59 }
60
61 // init the DC for drawing to this bitmap
62 DFBInit(bitmap.GetDirectFBSurface());
63 }