]> git.saurik.com Git - wxWidgets.git/blame - src/dfb/dcmemory.cpp
don't add new PNG handler instance every time wxSVGFileImplDC::DoDrawBitmap() is...
[wxWidgets.git] / src / dfb / dcmemory.cpp
CommitLineData
b3c86150
VS
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
40IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC)
41
fea35690 42void wxMemoryDC::Init()
b3c86150
VS
43{
44}
45
46wxMemoryDC::wxMemoryDC(wxDC *WXUNUSED(dc))
47{
48}
49
fea35690 50void wxMemoryDC::DoSelect(const wxBitmap& bitmap)
b3c86150 51{
5942996c
VS
52 m_bmp = bitmap;
53
b3c86150
VS
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
c16db850 62 DFBInit(bitmap.GetDirectFBSurface());
b3c86150 63}