diff options
author | Armin Le Grand <alg@apache.org> | 2012-02-24 16:26:37 +0000 |
---|---|---|
committer | Armin Le Grand <alg@apache.org> | 2012-02-24 16:26:37 +0000 |
commit | 66542c986aada2b4cac44a902d891213607dd89d (patch) | |
tree | 47ca4ab7edac114f5776743c5dd5c3a3b3265caf /vcl/source | |
parent | 9c691a142dc94f83630b2f18aa139a8b991bb2fd (diff) |
#118898# corrected error in GDIMetaFile::GetBoundRect in handling MetaFloatTransparentAction
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/gdi/gdimtf.cxx | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index f20409478fb0..6f077f3e58ca 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -1778,25 +1778,10 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( META_FLOATTRANSPARENT_ACTION ): { MetaFloatTransparentAction* pAct = (MetaFloatTransparentAction*) pAction; - GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() ); - // get the bound rect of the contained metafile - Rectangle aRect( aTransMtf.GetBoundRect( i_rReference ) ); - // scale the rect now on the assumption that the correct top left of the metafile - // (not its bounds !) is (0,0) - Size aPSize( aTransMtf.GetPrefSize() ); - aPSize = aMapVDev.LogicToLogic( aPSize, aTransMtf.GetPrefMapMode(), aMapVDev.GetMapMode() ); - Size aActSize( pAct->GetSize() ); - double fX = double(aActSize.Width())/double(aPSize.Width()); - double fY = double(aActSize.Height())/double(aPSize.Height()); - aRect.Left() = long(double(aRect.Left())*fX); - aRect.Right() = long(double(aRect.Right())*fX); - aRect.Top() = long(double(aRect.Top())*fY); - aRect.Bottom() = long(double(aRect.Bottom())*fY); - - // transform the rect to current VDev state - aRect = aMapVDev.LogicToLogic( aRect, aTransMtf.GetPrefMapMode(), aMapVDev.GetMapMode() ); - - ImplActionBounds( aBound, aRect, aClipStack, 0 ); + // MetaFloatTransparentAction is defined limiting it's content Metafile + // to it's geometry definition(Point, Size), so use these directly + const Rectangle aRect( pAct->GetPoint(), pAct->GetSize() ); + ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack, 0 ); } break; |