X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4693b20c7500190c3cc8c02919c45436bf5efbc9..3f4f90c2a0c1f274d1918b320132ed0ca2922fe5:/samples/rotate/rotate.cpp?ds=inline 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);