diff options
author | Oliver Bolte <obo@openoffice.org> | 2005-07-08 10:14:18 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2005-07-08 10:14:18 +0000 |
commit | 0d6988a72ebdeeeeef6f91d005c0e8a3f063d179 (patch) | |
tree | 27e7c91f806d5bfd9944128e259f468157f2030d /vcl | |
parent | 8da7f369fd46258562a870c2ea21bd019376588f (diff) |
INTEGRATION: CWS swqbf34 (1.12.226); FILE MERGED
2005/06/27 14:21:01 fme 1.12.226.1: #i47260# Temporarily switching off pixel offset, when calculating metafile drawmode offset
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/gdimtf.cxx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 229fe8831759..08be6656c5a1 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -2,9 +2,9 @@ * * $RCSfile: gdimtf.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: rt $ $Date: 2004-11-26 20:42:26 $ + * last change: $Author: obo $ $Date: 2005-07-08 11:14:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -548,7 +548,21 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos, aScaleX *= aDrawMap.GetScaleX(); aDrawMap.SetScaleX( aScaleX ); aScaleY *= aDrawMap.GetScaleY(); aDrawMap.SetScaleY( aScaleY ); + // #i47260# Convert logical output position to offset within + // the metafile's mapmode. Therefore, disable pixel offset on + // outdev, it's inverse mnOutOffLogicX/Y is calculated for a + // different mapmode (the one currently set on pOut, that is) + // - thus, aDrawMap's origin would generally be wrong. And + // even _if_ aDrawMap is similar to pOutDev's current mapmode, + // it's _still_ undesirable to have pixel offset unequal zero, + // because one would still get round-off errors (the + // round-trip error for LogicToPixel( PixelToLogic() ) was the + // reason for having pixel offset in the first place). + const Size& rOldOffset( pOut->GetPixelOffset() ); + const Size aEmptySize; + pOut->SetPixelOffset( aEmptySize ); aDrawMap.SetOrigin( pOut->PixelToLogic( pOut->LogicToPixel( rPos ), aDrawMap ) ); + pOut->SetPixelOffset( rOldOffset ); pOut->Push(); |