[Libreoffice-commits] core.git: vcl/win

Fridrich Å trba fridrich.strba at bluewin.ch
Mon Jun 17 15:27:06 PDT 2013


 vcl/win/source/gdi/salgdi_gdiplus.cxx |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

New commits:
commit fbe43e7943b2373c9a0e6571fd82fc16f9622802
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Tue Jun 18 00:26:14 2013 +0200

    Trying to fix salgdi_gdiplus
    
    Change-Id: I0125523fa74077bf482988f24381c0c1250c571f

diff --git a/vcl/win/source/gdi/salgdi_gdiplus.cxx b/vcl/win/source/gdi/salgdi_gdiplus.cxx
index bbf8149..1509f48 100644
--- a/vcl/win/source/gdi/salgdi_gdiplus.cxx
+++ b/vcl/win/source/gdi/salgdi_gdiplus.cxx
@@ -200,18 +200,19 @@ bool WinSalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rPolyPoly
             // checked that there is *no* transformation set (testcode commented out below) and
             // estimated that a stable factor dependent of the printer's DPI is used. Create
             // and set a transformation here to correct this
-            const Gdiplus::REAL aDpiX(aGraphics.GetDpiX());
-            const Gdiplus::REAL aDpiY(aGraphics.GetDpiY());
+            Gdiplus::REAL aDpiX;
+            Gdiplus::DllExports::GdipGetDpiX(pGraphics, &aDpiX);
+            Gdiplus::REAL aDpiY;
+            Gdiplus::DllExports::GdipGetDpiY(pGraphics, &aDpiY);
 
             // test code to check the current transformation at the graphics device
-            //Gdiplus::Matrix matrix;
-            //aGraphics.GetTransform(&matrix);
+            //Gdiplus::GpMatrix *pMatrix = NULL;
+            //Gdiplus::DllExports::GdipGetWorldTransform(pGraphics, pMatrix);
             //Gdiplus::REAL elements[6];
-            //matrix.GetElements(elements);
+            //Gdiplus::DllExports::GdipGetMatrixElements(pMatrix, elements);
+            //Gdiplus::DllExports::GdipDeleteMatrix(pMatrix);
 
-            Gdiplus::Matrix aPrinterTransform;
-            aPrinterTransform.Scale(Gdiplus::REAL(100.0) / aDpiX, Gdiplus::REAL(100.0) / aDpiY);
-            aGraphics.SetTransform(&aPrinterTransform);
+            Gdiplus::DllExports::GdipScaleWorldTransform(pGraphics, Gdiplus::REAL(100.0) / aDpiX, Gdiplus::REAL(100.0) / aDpiY, Gdiplus::MatrixOrderAppend);
         }
 
         Gdiplus::DllExports::GdipFillPath(pGraphics, pTestBrush, pPath);


More information about the Libreoffice-commits mailing list