Fix drawing of scaled bitmaps in wxCairoContext.
We must offset the coordinate system before scaling it, otherwise incorrect offset is used. Add a test for drawing translated/scaled bitmaps to the drawing sample. See #11097. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1052,8 +1052,15 @@ void MyCanvas::DrawGraphics(wxGraphicsContext* gc)
|
||||
gc->PopState();
|
||||
}
|
||||
gc->PopState();
|
||||
|
||||
gc->PushState();
|
||||
gc->Translate(60, 400);
|
||||
gc->DrawText("Scaled smiley inside a square", 0, 0);
|
||||
gc->DrawRectangle(BASE2, BASE2, 100, 100);
|
||||
gc->DrawBitmap(m_smile_bmp, BASE2, BASE2, 100, 100);
|
||||
gc->PopState();
|
||||
}
|
||||
#endif
|
||||
#endif // wxUSE_GRAPHICS_CONTEXT
|
||||
|
||||
void MyCanvas::DrawCircles(wxDC& dc)
|
||||
{
|
||||
|
Reference in New Issue
Block a user