]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk1/dcmemory.cpp
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 #pragma implementation "dcmemory.h"
15 #include "wx/dcmemory.h"
17 //-----------------------------------------------------------------------------
19 //-----------------------------------------------------------------------------
21 IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC
,wxPaintDC
)
23 wxMemoryDC::wxMemoryDC(void)
26 m_cmap
= gdk_colormap_get_system();
29 wxMemoryDC::wxMemoryDC( wxDC
*WXUNUSED(dc
) )
32 m_cmap
= gdk_colormap_get_system();
35 wxMemoryDC::~wxMemoryDC(void)
39 void wxMemoryDC::SelectObject( const wxBitmap
& bitmap
)
44 if (m_selected
.GetPixmap())
46 m_window
= m_selected
.GetPixmap();
50 m_window
= m_selected
.GetBitmap();
62 void wxMemoryDC::GetSize( int *width
, int *height
)
66 if (width
) (*width
) = m_selected
.GetWidth();
67 if (height
) (*height
) = m_selected
.GetHeight();
71 if (width
) (*width
) = 0;
72 if (height
) (*height
) = 0;