X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8520f1374ceec64abae3802984c4f8654d8836ba..c4e2838090992384911a6a6aa44cac985d79a555:/samples/png/pngdemo.cpp diff --git a/samples/png/pngdemo.cpp b/samples/png/pngdemo.cpp index 7d1c3a47d3..5ae070ba07 100644 --- a/samples/png/pngdemo.cpp +++ b/samples/png/pngdemo.cpp @@ -29,10 +29,6 @@ wxBitmap *g_TestBitmap = (wxBitmap *) NULL; IMPLEMENT_APP(MyApp) -MyApp::MyApp() -{ -} - bool MyApp::OnInit(void) { wxImage::AddHandler(new wxPNGHandler); @@ -119,9 +115,9 @@ void MyFrame::OnSaveFile(wxCommandEvent& WXUNUSED(event)) wxT("png"), wxT("PNG files (*.png)|*.png") ); if (f == _T("")) return; - + wxBitmap *backstore = new wxBitmap( 150, 150 ); - + wxMemoryDC memDC; memDC.SelectObject( *backstore ); memDC.Clear(); @@ -132,11 +128,11 @@ void MyFrame::OnSaveFile(wxCommandEvent& WXUNUSED(event)) memDC.DrawLine( 0, 0, 0, 10 ); memDC.SetTextForeground( *wxWHITE ); memDC.DrawText( _T("This is a memory dc."), 10, 10 ); - + memDC.SelectObject( wxNullBitmap ); - + backstore->SaveFile( f, wxBITMAP_TYPE_PNG, (wxPalette*)NULL ); - + delete backstore; } @@ -173,10 +169,6 @@ MyCanvas::MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size): { } -MyCanvas::~MyCanvas(void) -{ -} - // Define the repainting behaviour void MyCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {