]> git.saurik.com Git - wxWidgets.git/commitdiff
fix bitmap position with RTL and non-default scale
authorPaul Cornett <paulcor@bullseye.com>
Sun, 7 Dec 2008 05:50:11 +0000 (05:50 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Sun, 7 Dec 2008 05:50:11 +0000 (05:50 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/dcclient.cpp

index 7c647971b0d1a9cdb23838f792ab129126b2e8f3..a7c10579f31d5db6518ad9b118c4183228343728 100644 (file)
@@ -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;