]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't set background of wxMemoryDC before selecting bitmap into it.
authorJamie Gadd <jrgadd2@cs.latrobe.edu.au>
Thu, 13 Jul 2006 00:41:55 +0000 (00:41 +0000)
committerJamie Gadd <jrgadd2@cs.latrobe.edu.au>
Thu, 13 Jul 2006 00:41:55 +0000 (00:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40080 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/controls/controls.cpp

index c0b9d7924e2c15ba4c5eedeb97c4948668321d79..63c92a6883e2cb6ac8cb98a5a25ce5160cfe292e 100644 (file)
@@ -960,9 +960,9 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
 
     wxBitmap bitmap( 100, 100 );
     wxMemoryDC dc;
-    dc.SetBackground(*wxGREEN);
     dc.SelectObject( bitmap );
-    dc.SetPen(*wxGREEN_PEN);
+    dc.SetBackground(*wxGREEN);
+    dc.SetPen(*wxRED_PEN);
     dc.Clear();
     dc.DrawEllipse(5, 5, 90, 90);
     dc.DrawText(_T("Bitmap"), 30, 40);