diff options
author | Noel Power <noel.power@novell.com> | 2010-10-13 15:17:38 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2010-10-13 15:17:38 +0100 |
commit | 1f4a6a21cb5445d3ed0c7d544906d5c98e31447a (patch) | |
tree | 7d8ab04dc4750c8dec9e9194d496b89a46670ddc /vcl/source | |
parent | 44b6cad4026d7c48325a43c970d05493c4113e1b (diff) | |
parent | 8e3b6ac3249200da87d1bd4b7ef0c7e51b706dd6 (diff) |
Merge branch 'master' of ssh://noelp@git.freedesktop.org/git/libreoffice/libs-gui
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/gdi/metaact.cxx | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | vcl/source/gdi/outdev2.cxx | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index 1102569d0844..c4e571cbdce2 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -3793,7 +3793,6 @@ MetaAction* MetaFloatTransparentAction::Clone() void MetaFloatTransparentAction::Move( long nHorzMove, long nVertMove ) { maPoint.Move( nHorzMove, nVertMove ); - maMtf.Move(nHorzMove, nVertMove); } // ------------------------------------------------------------------------ @@ -3804,7 +3803,6 @@ void MetaFloatTransparentAction::Scale( double fScaleX, double fScaleY ) ImplScaleRect( aRectangle, fScaleX, fScaleY ); maPoint = aRectangle.TopLeft(); maSize = aRectangle.GetSize(); - maMtf.Scale(fScaleX, fScaleY); } // ------------------------------------------------------------------------ diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index 29c22e8f7962..7aaa9d7d510a 100644..100755 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -1986,7 +1986,15 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha, const long nSrcWidth = aBmpRect.GetWidth(), nSrcHeight = aBmpRect.GetHeight(); const long nDstWidth = aDstRect.GetWidth(), nDstHeight = aDstRect.GetHeight(); const long nOutWidth = aOutSz.Width(), nOutHeight = aOutSz.Height(); - const long nOffX = aDstRect.Left() - aOutPt.X(), nOffY = aDstRect.Top() - aOutPt.Y(); + // calculate offset in original bitmap + // in RTL case this is a little more complicated since the contents of the + // bitmap is not mirrored (it never is), however the paint region and bmp region + // are in mirrored coordinates, so the intersection of (aOutPt,aOutSz) with these + // is content wise somewhere else and needs to take mirroring into account + const long nOffX = IsRTLEnabled() + ? aOutSz.Width() - aDstRect.GetWidth() - (aDstRect.Left() - aOutPt.X()) + : aDstRect.Left() - aOutPt.X(), + nOffY = aDstRect.Top() - aOutPt.Y(); long nX, nOutX, nY, nOutY; long nMirrOffX = 0; long nMirrOffY = 0; @@ -2000,7 +2008,6 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha, for( nX = 0L, nOutX = nOffX; nX < nDstWidth; nX++, nOutX++ ) { pMapX[ nX ] = aBmpRect.Left() + nOutX * nSrcWidth / nOutWidth; - if( bHMirr ) pMapX[ nX ] = nMirrOffX - pMapX[ nX ]; } |