incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1233948 - /incubator/ooo/trunk/main/vcl/source/gdi/svgdata.cxx
Date Fri, 20 Jan 2012 15:18:31 GMT
Author: alg
Date: Fri Jan 20 15:18:31 2012
New Revision: 1233948

URL: http://svn.apache.org/viewvc?rev=1233948&view=rev
Log:
svg: uses current system Dpi for Svg replacement image creation

Modified:
    incubator/ooo/trunk/main/vcl/source/gdi/svgdata.cxx

Modified: incubator/ooo/trunk/main/vcl/source/gdi/svgdata.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/source/gdi/svgdata.cxx?rev=1233948&r1=1233947&r2=1233948&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/source/gdi/svgdata.cxx (original)
+++ incubator/ooo/trunk/main/vcl/source/gdi/svgdata.cxx Fri Jan 20 15:18:31 2012
@@ -30,6 +30,8 @@
 #include <com/sun/star/rendering/XIntegerReadOnlyBitmap.hpp>
 #include <vcl/canvastools.hxx>
 #include <comphelper/seqstream.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/outdev.hxx>
 
 //////////////////////////////////////////////////////////////////////////////
 
@@ -62,13 +64,16 @@ void SvgData::ensureReplacement()
                 aRealRect.Y1 = rRange.getMinY();
                 aRealRect.X2 = rRange.getMaxX();
                 aRealRect.Y2 = rRange.getMaxY();
-                
+
+                // get system DPI
+                const Size aDPI(Application::GetDefaultDevice()->LogicToPixel(Size(1,
1), MAP_INCH));
+
                 const uno::Reference< rendering::XBitmap > xBitmap(
                     xPrimitive2DRenderer->rasterize( 
                         maSequence,
                         aViewParameters, 
-                        72, 
-                        72, 
+                        aDPI.getWidth(), 
+                        aDPI.getHeight(), 
                         aRealRect, 
                         500000));
 



Mime
View raw message