X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4693b20c7500190c3cc8c02919c45436bf5efbc9..6d9022fe3bb50a75b9b5eaf5cf32558e518ba310:/samples/rotate/rotate.cpp?ds=sidebyside diff --git a/samples/rotate/rotate.cpp b/samples/rotate/rotate.cpp index 2bdb6270e9..2f26cf2a7e 100644 --- a/samples/rotate/rotate.cpp +++ b/samples/rotate/rotate.cpp @@ -161,10 +161,10 @@ void MyCanvas::OnMouseLeftUp (wxMouseEvent & event) const wxImage& img = wxGetApp().GetImage(); wxImage img2 = img.Rotate(frame->m_angle, wxPoint(img.GetWidth()/2, img.GetHeight()/2), TRUE, &offset); - wxBitmap bmp = img2.ConvertToBitmap (); + wxBitmap bmp(img2); wxClientDC dc (this); - dc.DrawBitmap (img2.ConvertToBitmap(), event.m_x + offset.x, event.m_y + offset.y, TRUE); + dc.DrawBitmap (bmp, event.m_x + offset.x, event.m_y + offset.y, TRUE); } // without interpolation, and without offset correction @@ -175,7 +175,7 @@ void MyCanvas::OnMouseRightUp (wxMouseEvent & event) const wxImage& img = wxGetApp().GetImage(); wxImage img2 = img.Rotate(frame->m_angle, wxPoint(img.GetWidth()/2, img.GetHeight()/2), FALSE); - wxBitmap bmp = img2.ConvertToBitmap (); + wxBitmap bmp(img2); wxClientDC dc (this); dc.DrawBitmap (bmp, event.m_x, event.m_y, TRUE);