]> git.saurik.com Git - wxWidgets.git/blame - src/dfb/dcmemory.cpp
Fix wxHtmlHelpData::SetTempDir() to behave correctly without trailing slash.
[wxWidgets.git] / src / dfb / dcmemory.cpp
CommitLineData
b3c86150
VS
1/////////////////////////////////////////////////////////////////////////////
2// Name: src/dfb/dcmemory.cpp
4a624f6e 3// Purpose: wxMemoryDCImpl implementation
b3c86150
VS
4// Author: Vaclav Slavik
5// Created: 2006-08-16
b3c86150
VS
6// Copyright: (c) 2006 REA Elektronik GmbH
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10// ===========================================================================
11// declarations
12// ===========================================================================
13
14// ---------------------------------------------------------------------------
15// headers
16// ---------------------------------------------------------------------------
17
18// For compilers that support precompilation, includes "wx.h".
19#include "wx/wxprec.h"
20
b3c86150
VS
21#ifndef WX_PRECOMP
22 #include "wx/bitmap.h"
23#endif
24
4d2df97f 25#include "wx/dcmemory.h"
4a624f6e 26#include "wx/dfb/dcmemory.h"
b3c86150
VS
27#include "wx/dfb/private.h"
28
29// ===========================================================================
30// implementation
31// ===========================================================================
32
33//-----------------------------------------------------------------------------
4a624f6e 34// wxMemoryDCImpl
b3c86150
VS
35//-----------------------------------------------------------------------------
36
4a624f6e 37#warning "FIXME: verify/fix that wxMemoryDCImpl works correctly with mono bitmaps"
b3c86150 38
4a624f6e 39IMPLEMENT_ABSTRACT_CLASS(wxMemoryDCImpl, wxDFBDCImpl)
b3c86150 40
4a624f6e 41void wxMemoryDCImpl::Init()
b3c86150
VS
42{
43}
44
4d2df97f
VS
45wxMemoryDCImpl::wxMemoryDCImpl(wxMemoryDC *owner)
46 : wxDFBDCImpl(owner)
47{
48 Init();
49}
50
51wxMemoryDCImpl::wxMemoryDCImpl(wxMemoryDC *owner, wxBitmap& bitmap)
52 : wxDFBDCImpl(owner)
53{
54 Init();
55 DoSelect(bitmap);
56}
57
4a624f6e
VZ
58wxMemoryDCImpl::wxMemoryDCImpl(wxMemoryDC *owner, wxDC *WXUNUSED(dc))
59 : wxDFBDCImpl(owner)
b3c86150
VS
60{
61}
62
4a624f6e 63void wxMemoryDCImpl::DoSelect(const wxBitmap& bitmap)
b3c86150 64{
5942996c
VS
65 m_bmp = bitmap;
66
a1b806b9 67 if ( !bitmap.IsOk() )
b3c86150
VS
68 {
69 // select the bitmap out of the DC
70 m_surface = NULL;
71 return;
72 }
73
74 // init the DC for drawing to this bitmap
c16db850 75 DFBInit(bitmap.GetDirectFBSurface());
b3c86150 76}