]>
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"
16 //-----------------------------------------------------------------------------
18 //-----------------------------------------------------------------------------
20 IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC
,wxPaintDC
)
22 wxMemoryDC::wxMemoryDC(void)
26 m_cmap
= gtk_widget_get_default_colormap();
29 wxMemoryDC::wxMemoryDC( wxDC
*WXUNUSED(dc
) )
33 m_cmap
= gtk_widget_get_default_colormap();
36 wxMemoryDC::~wxMemoryDC(void)
40 void wxMemoryDC::SelectObject( const wxBitmap
& bitmap
)
45 if (m_selected
.GetPixmap())
47 m_window
= m_selected
.GetPixmap();
51 m_window
= m_selected
.GetBitmap();
61 m_window
= (GdkWindow
*) NULL
;
65 void wxMemoryDC::GetSize( int *width
, int *height
) const
69 if (width
) (*width
) = m_selected
.GetWidth();
70 if (height
) (*height
) = m_selected
.GetHeight();
74 if (width
) (*width
) = 0;
75 if (height
) (*height
) = 0;