]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk/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();
64 void wxMemoryDC::GetSize( int *width
, int *height
) const
68 if (width
) (*width
) = m_selected
.GetWidth();
69 if (height
) (*height
) = m_selected
.GetHeight();
73 if (width
) (*width
) = 0;
74 if (height
) (*height
) = 0;