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:
@@ -1059,8 +1059,11 @@ void wxWindowDCImpl::DoDrawBitmap( const wxBitmap &bitmap,
|
|||||||
const int w = bitmap.GetWidth();
|
const int w = bitmap.GetWidth();
|
||||||
const int h = bitmap.GetHeight();
|
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, y);
|
||||||
CalcBoundingBox(x + w, y + h);
|
CalcBoundingBox(x + m_signX*w, y + m_signY*h);
|
||||||
|
|
||||||
// device coords
|
// device coords
|
||||||
int xx = LogicalToDeviceX(x);
|
int xx = LogicalToDeviceX(x);
|
||||||
|
Reference in New Issue
Block a user