wxMemoryDC constructor now optionally accepts a wxBitmap parameter,

calling SelectObject itself if a valid bitmap is passed.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-10-13 18:48:36 +00:00
parent 51ad652fa2
commit 432efcb004
26 changed files with 77 additions and 27 deletions

View File

@@ -35,7 +35,7 @@
IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxWindowDC)
wxMemoryDC::wxMemoryDC(void)
wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap )
{
m_ok = true;
m_display = wxGetDisplay();
@@ -57,6 +57,9 @@ wxMemoryDC::wxMemoryDC(void)
SetBrush (* wxWHITE_BRUSH);
SetPen (* wxBLACK_PEN);
SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
if ( bitmap.IsOk() )
SelectObject(bitmap);
}
wxMemoryDC::wxMemoryDC( wxDC* dc )