[QGIS Commit] r13631 - in trunk/qgis: src/core/symbology-ng tests/src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Jun 3 06:49:28 EDT 2010


Author: wonder
Date: 2010-06-03 06:49:26 -0400 (Thu, 03 Jun 2010)
New Revision: 13631

Modified:
   trunk/qgis/src/core/symbology-ng/qgsfillsymbollayerv2.cpp
   trunk/qgis/tests/src/core/CMakeLists.txt
Log:
Fixed #2744


Modified: trunk/qgis/src/core/symbology-ng/qgsfillsymbollayerv2.cpp
===================================================================
--- trunk/qgis/src/core/symbology-ng/qgsfillsymbollayerv2.cpp	2010-06-03 10:24:53 UTC (rev 13630)
+++ trunk/qgis/src/core/symbology-ng/qgsfillsymbollayerv2.cpp	2010-06-03 10:49:26 UTC (rev 13631)
@@ -52,6 +52,14 @@
 {
   mColor.setAlphaF( context.alpha() );
   mBrush = QBrush( mColor, mBrushStyle );
+
+  // scale brush content for printout
+  double rasterScaleFactor = context.renderContext().rasterScaleFactor();
+  if ( rasterScaleFactor != 1.0 )
+  {
+    mBrush.setMatrix( QMatrix().scale( 1.0 / rasterScaleFactor, 1.0 / rasterScaleFactor ) );
+  }
+
   QColor selColor = context.selectionColor();
   // selColor.setAlphaF( context.alpha() );
   mSelBrush = QBrush( selColor );

Modified: trunk/qgis/tests/src/core/CMakeLists.txt
===================================================================
--- trunk/qgis/tests/src/core/CMakeLists.txt	2010-06-03 10:24:53 UTC (rev 13630)
+++ trunk/qgis/tests/src/core/CMakeLists.txt	2010-06-03 10:49:26 UTC (rev 13631)
@@ -7,8 +7,11 @@
 # the UI file won't be wrapped!
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} 
   ${CMAKE_CURRENT_BINARY_DIR}
-  ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/core
-  ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/core/raster
+  ${CMAKE_SOURCE_DIR}/src/core
+  ${CMAKE_SOURCE_DIR}/src/core/raster
+  ${CMAKE_SOURCE_DIR}/src/core/renderer
+  ${CMAKE_SOURCE_DIR}/src/core/symbology
+  ${CMAKE_SOURCE_DIR}/src/core/symbology-ng
   ${QT_INCLUDE_DIR}
   ${GDAL_INCLUDE_DIR}
   ${PROJ_INCLUDE_DIR}
@@ -113,3 +116,6 @@
 ADD_QGIS_TEST(coordinatereferencesystemtest testqgscoordinatereferencesystem.cpp)
 ADD_QGIS_TEST(pointtest testqgspoint.cpp)
 ADD_QGIS_TEST(searchstringtest testqgssearchstring.cpp)
+
+ADD_QGIS_TEST(renderingbenchmark rendering_benchmark.cpp)
+



More information about the QGIS-commit mailing list