don't erase the background to see the transparent images better

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2003-03-04 02:10:27 +00:00
parent 9ae2ec95cf
commit 0c543b7a19

View File

@ -135,11 +135,15 @@ public:
SetClientSize(bitmap.GetWidth(), bitmap.GetHeight());
}
void OnEraseBackground(wxEraseEvent& WXUNUSED(event))
{
// do nothing here to be able to see how transparent images are shown
}
void OnPaint(wxPaintEvent& WXUNUSED(event))
{
wxPaintDC dc( this );
//TRUE for masked images
dc.DrawBitmap( m_bitmap, 0, 0, TRUE );
dc.DrawBitmap( m_bitmap, 0, 0, TRUE /* use mask */ );
}
void OnSave(wxMouseEvent& WXUNUSED(event))
@ -237,8 +241,9 @@ IMPLEMENT_APP(MyApp)
IMPLEMENT_DYNAMIC_CLASS(MyCanvas, wxScrolledWindow)
BEGIN_EVENT_TABLE(MyImageFrame, wxFrame)
EVT_PAINT(MyImageFrame::OnPaint)
EVT_LEFT_DCLICK(MyImageFrame::OnSave)
EVT_ERASE_BACKGROUND(MyImageFrame::OnEraseBackground)
EVT_PAINT(MyImageFrame::OnPaint)
EVT_LEFT_DCLICK(MyImageFrame::OnSave)
END_EVENT_TABLE()
BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)