]> git.saurik.com Git - wxWidgets.git/blob - src/dfb/dcmemory.cpp
correction to last commit: don't test unsetenv() return value, it's void under Darwin
[wxWidgets.git] / src / dfb / dcmemory.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/dfb/dcmemory.cpp
3 // Purpose: wxMemoryDC 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 #include "wx/dcmemory.h"
23
24 #ifndef WX_PRECOMP
25 #include "wx/bitmap.h"
26 #endif
27
28 #include "wx/dfb/private.h"
29
30 // ===========================================================================
31 // implementation
32 // ===========================================================================
33
34 //-----------------------------------------------------------------------------
35 // wxMemoryDC
36 //-----------------------------------------------------------------------------
37
38 #warning "FIXME: verify/fix that wxMemoryDC works correctly with mono bitmaps"
39
40 IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC)
41
42 void wxMemoryDC::Init()
43 {
44 }
45
46 wxMemoryDC::wxMemoryDC(wxDC *WXUNUSED(dc))
47 {
48 }
49
50 void wxMemoryDC::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 }