]> git.saurik.com Git - wxWidgets.git/blame - src/dfb/dcmemory.cpp
Added list style to text attributes, independent from paragraph style
[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
432efcb0 42wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap )
b3c86150 43{
432efcb0
RD
44 if ( bitmap.IsOk() )
45 SelectObject(bitmap);
b3c86150
VS
46}
47
48wxMemoryDC::wxMemoryDC(wxDC *WXUNUSED(dc))
49{
50}
51
52void wxMemoryDC::SelectObject(const wxBitmap& bitmap)
53{
5942996c
VS
54 m_bmp = bitmap;
55
b3c86150
VS
56 if ( !bitmap.Ok() )
57 {
58 // select the bitmap out of the DC
59 m_surface = NULL;
60 return;
61 }
62
63 // init the DC for drawing to this bitmap
64 Init(bitmap.GetDirectFBSurface());
65}