]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk1/dcmemory.cpp
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #pragma implementation "dcmemory.h"
14 #include "wx/dcmemory.h"
16 //-----------------------------------------------------------------------------
18 //-----------------------------------------------------------------------------
20 IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC
,wxWindowDC
)
22 wxMemoryDC::wxMemoryDC() : wxWindowDC()
26 m_cmap
= gtk_widget_get_default_colormap();
29 wxMemoryDC::wxMemoryDC( wxDC
*WXUNUSED(dc
) )
34 m_cmap
= gtk_widget_get_default_colormap();
37 wxMemoryDC::~wxMemoryDC()
41 void wxMemoryDC::SelectObject( const wxBitmap
& bitmap
)
46 if (m_selected
.GetPixmap())
48 m_window
= m_selected
.GetPixmap();
52 m_window
= m_selected
.GetBitmap();
62 m_window
= (GdkWindow
*) NULL
;
66 void wxMemoryDC::GetSize( int *width
, int *height
) const
70 if (width
) (*width
) = m_selected
.GetWidth();
71 if (height
) (*height
) = m_selected
.GetHeight();
75 if (width
) (*width
) = 0;
76 if (height
) (*height
) = 0;