]> git.saurik.com Git - wxWidgets.git/blame - src/os2/dcmemory.cpp
repaired some of the more obvious horrors in the contrib (configure) Makefiles
[wxWidgets.git] / src / os2 / dcmemory.cpp
CommitLineData
0e320a79
DW
1/////////////////////////////////////////////////////////////////////////////
2// Name: dcmemory.cpp
3// Purpose: wxMemoryDC class
fb46a9a6 4// Author: David Webster
0e320a79 5// Modified by:
fb46a9a6 6// Created: 10/14/99
0e320a79 7// RCS-ID: $Id$
fb46a9a6
DW
8// Copyright: (c) David Webster
9// Licence: wxWindows licence
0e320a79
DW
10/////////////////////////////////////////////////////////////////////////////
11
fb46a9a6
DW
12// For compilers that support precompilation, includes "wx.h".
13#include "wx/wxprec.h"
14
15#ifndef WX_PRECOMP
16#include "wx/utils.h"
0e320a79
DW
17#endif
18
fb46a9a6
DW
19#include "wx/os2/private.h"
20
0e320a79
DW
21#include "wx/dcmemory.h"
22
fb46a9a6 23IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC)
0e320a79 24
fb46a9a6
DW
25/*
26 * Memory DC
27 *
28 */
0e320a79
DW
29
30wxMemoryDC::wxMemoryDC(void)
31{
fb46a9a6
DW
32 // TODO:
33/*
34 m_hDC = (WXHDC) ::CreateCompatibleDC((HDC) NULL);
35 m_ok = (m_hDC != 0);
36 m_bOwnsDC = TRUE;
0e320a79 37
fb46a9a6
DW
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
48wxMemoryDC::wxMemoryDC(wxDC *old_dc)
0e320a79 49{
fb46a9a6
DW
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}
0e320a79
DW
68
69wxMemoryDC::~wxMemoryDC(void)
70{
71};
72
73void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
74{
fb46a9a6 75 // TODO:
0e320a79
DW
76};
77
fb46a9a6 78void wxMemoryDC::DoGetSize( int *width, int *height ) const
0e320a79 79{
fb46a9a6 80 if (!m_selectedBitmap.Ok())
0e320a79 81 {
fb46a9a6
DW
82 *width = 0; *height = 0;
83 return;
0e320a79 84 }
fb46a9a6
DW
85 *width = m_selectedBitmap.GetWidth();
86 *height = m_selectedBitmap.GetHeight();
0e320a79
DW
87};
88
89