]> git.saurik.com Git - wxWidgets.git/blob - src/qt/dcmemory.cpp
Committing in .
[wxWidgets.git] / src / qt / dcmemory.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: dcmemory.cpp
3 // Purpose: wxMemoryDC class
4 // Author: AUTHOR
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifdef __GNUG__
13 #pragma implementation "dcmemory.h"
14 #endif
15
16 #include "wx/dcmemory.h"
17
18 IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC)
19
20 //-----------------------------------------------------------------------------
21 // wxMemoryDC
22 //-----------------------------------------------------------------------------
23
24 IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxPaintDC)
25
26 wxMemoryDC::wxMemoryDC(void)
27 {
28 m_ok = FALSE;
29 };
30
31 wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )
32 {
33 m_ok = FALSE;
34 };
35
36 wxMemoryDC::~wxMemoryDC(void)
37 {
38 };
39
40 void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
41 {
42 m_selected = bitmap;
43 if (m_selected.Ok())
44 {
45 }
46 else
47 {
48 m_ok = FALSE;
49 };
50 };
51
52 void wxMemoryDC::GetSize( int *width, int *height ) const
53 {
54 if (m_selected.Ok())
55 {
56 if (width) (*width) = m_selected.GetWidth();
57 if (height) (*height) = m_selected.GetHeight();
58 }
59 else
60 {
61 if (width) (*width) = 0;
62 if (height) (*height) = 0;
63 };
64 };
65
66