vcl/source/gdi/impgraph.cxx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)
New commits: commit b5797deea72476fbcec4315f1f18249fd39bbaea Author: Armin Le Grand <a...@apache.org> Date: Wed Jan 22 20:25:16 2014 +0000 i123983 Corrected Graphic Metafile fallback creator diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index afa97e5..d427e96 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -710,22 +710,21 @@ const GDIMetaFile& ImpGraphic::ImplGetGDIMetaFile() const pThat->maEx = maSvgData->getReplacement(); } - VirtualDevice aVirDev; - const Size aSizePixel(maEx.GetSizePixel()); - - pThat->maMetaFile.Record(&aVirDev); - + // #123983# directly create a metafile with the same PrefSize and PrefMapMode + // the bitmap has, this will be an always correct metafile if(maEx.IsTransparent()) { - aVirDev.DrawBitmapEx(Point(), maEx); + pThat->maMetaFile.AddAction(new MetaBmpExScaleAction(Point(), maEx.GetPrefSize(), maEx)); } else { - aVirDev.DrawBitmap(Point(), maEx.GetBitmap()); + pThat->maMetaFile.AddAction(new MetaBmpScaleAction(Point(), maEx.GetPrefSize(), maEx.GetBitmap())); } pThat->maMetaFile.Stop(); - pThat->maMetaFile.SetPrefSize(aSizePixel); + pThat->maMetaFile.WindStart(); + pThat->maMetaFile.SetPrefSize(maEx.GetPrefSize()); + pThat->maMetaFile.SetPrefMapMode(maEx.GetPrefMapMode()); } return maMetaFile; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits