fix bitmap position with RTL and non-default scale
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1070,9 +1070,6 @@ void wxWindowDCImpl::DoDrawBitmap( const wxBitmap &bitmap,
|
||||
int w = bitmap.GetWidth();
|
||||
int h = bitmap.GetHeight();
|
||||
|
||||
if (m_window && m_window->GetLayoutDirection() == wxLayout_RightToLeft)
|
||||
xx -= w;
|
||||
|
||||
CalcBoundingBox( x, y );
|
||||
CalcBoundingBox( x + w, y + h );
|
||||
|
||||
@@ -1081,6 +1078,9 @@ void wxWindowDCImpl::DoDrawBitmap( const wxBitmap &bitmap,
|
||||
int ww = XLOG2DEVREL(w);
|
||||
int hh = YLOG2DEVREL(h);
|
||||
|
||||
if (m_window && m_window->GetLayoutDirection() == wxLayout_RightToLeft)
|
||||
xx -= ww;
|
||||
|
||||
if (IsOutsideOfClippingRegion( xx,yy,ww,hh ))
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user