]> git.saurik.com Git - wxWidgets.git/blob - src/os2/dcmemory.cpp
fixed KDE link file reading code
[wxWidgets.git] / src / os2 / dcmemory.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: dcmemory.cpp
3 // Purpose: wxMemoryDC class
4 // Author: David Webster
5 // Modified by:
6 // Created: 10/14/99
7 // RCS-ID: $Id$
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 // For compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
14
15 #ifndef WX_PRECOMP
16 #include "wx/utils.h"
17 #endif
18
19 #include "wx/os2/private.h"
20
21 #include "wx/dcmemory.h"
22
23 IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC)
24
25 /*
26 * Memory DC
27 *
28 */
29
30 wxMemoryDC::wxMemoryDC(void)
31 {
32 // TODO:
33 /*
34 m_hDC = (WXHDC) ::CreateCompatibleDC((HDC) NULL);
35 m_ok = (m_hDC != 0);
36 m_bOwnsDC = TRUE;
37
38 SetBrush(*wxWHITE_BRUSH);
39 SetPen(*wxBLACK_PEN);
40
41 // the background mode is only used for text background
42 // and is set in DrawText() to OPAQUE as required, other-
43 // wise always TRANSPARENT, RR
44 ::SetBkMode( GetHdc(), TRANSPARENT );
45 */
46 }
47
48 wxMemoryDC::wxMemoryDC(wxDC *old_dc)
49 {
50 // TODO:
51 /*
52 old_dc->BeginDrawing();
53
54 m_hDC = (WXHDC) ::CreateCompatibleDC((HDC) old_dc->GetHDC());
55 m_ok = (m_hDC != 0);
56
57 old_dc->EndDrawing();
58
59 SetBrush(*wxWHITE_BRUSH);
60 SetPen(*wxBLACK_PEN);
61
62 // the background mode is only used for text background
63 // and is set in DrawText() to OPAQUE as required, other-
64 // wise always TRANSPARENT, RR
65 ::SetBkMode( GetHdc(), TRANSPARENT );
66 */
67 }
68
69 wxMemoryDC::~wxMemoryDC(void)
70 {
71 };
72
73 void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
74 {
75 // TODO:
76 };
77
78 void wxMemoryDC::DoGetSize( int *width, int *height ) const
79 {
80 if (!m_vSelectedBitmap.Ok())
81 {
82 *width = 0; *height = 0;
83 return;
84 }
85 *width = m_vSelectedBitmap.GetWidth();
86 *height = m_vSelectedBitmap.GetHeight();
87 };
88
89