Correct the bounding box calculation in wxGTK wxDC::DrawBitmap().

Take into account the axis direction when calculating the bounding box.

This is consistent with not reversing the bitmap even when the axis are
reversed which is probably the expected behaviour.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-02-03 21:07:42 +00:00
parent d3019e4d0a
commit 15b8500726

View File

@@ -1059,8 +1059,11 @@ void wxWindowDCImpl::DoDrawBitmap( const wxBitmap &bitmap,
const int w = bitmap.GetWidth();
const int h = bitmap.GetHeight();
// notice that as the bitmap is not drawn upside down (or right to left)
// even if the corresponding axis direction is inversed, we need to take it
// into account when calculating its bounding box
CalcBoundingBox(x, y);
CalcBoundingBox(x + w, y + h);
CalcBoundingBox(x + m_signX*w, y + m_signY*h);
// device coords
int xx = LogicalToDeviceX(x);