don't use deprecated wxImage methods inside wxWin
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user