]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk/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"
19 //-----------------------------------------------------------------------------
21 //-----------------------------------------------------------------------------
23 IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC
,wxWindowDC
)
25 wxMemoryDC::wxMemoryDC() : wxWindowDC()
29 m_cmap
= gtk_widget_get_default_colormap();
32 wxMemoryDC::wxMemoryDC( wxDC
*WXUNUSED(dc
) )
37 m_cmap
= gtk_widget_get_default_colormap();
40 wxMemoryDC::~wxMemoryDC()
44 void wxMemoryDC::SelectObject( const wxBitmap
& bitmap
)
49 if (m_selected
.GetPixmap())
51 m_window
= m_selected
.GetPixmap();
55 m_window
= m_selected
.GetBitmap();
65 m_window
= (GdkWindow
*) NULL
;
69 void wxMemoryDC::GetSize( int *width
, int *height
) const
73 if (width
) (*width
) = m_selected
.GetWidth();
74 if (height
) (*height
) = m_selected
.GetHeight();
78 if (width
) (*width
) = 0;
79 if (height
) (*height
) = 0;