Skip to content

Commit 9b601b3

Browse files
author
wonder
committed
Fixed #2744
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13631 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent f0e7c26 commit 9b601b3

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/core/symbology-ng/qgsfillsymbollayerv2.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ void QgsSimpleFillSymbolLayerV2::startRender( QgsSymbolV2RenderContext& context
5252
{
5353
mColor.setAlphaF( context.alpha() );
5454
mBrush = QBrush( mColor, mBrushStyle );
55+
56+
// scale brush content for printout
57+
double rasterScaleFactor = context.renderContext().rasterScaleFactor();
58+
if ( rasterScaleFactor != 1.0 )
59+
{
60+
mBrush.setMatrix( QMatrix().scale( 1.0 / rasterScaleFactor, 1.0 / rasterScaleFactor ) );
61+
}
62+
5563
QColor selColor = context.selectionColor();
5664
// selColor.setAlphaF( context.alpha() );
5765
mSelBrush = QBrush( selColor );

tests/src/core/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ SET (util_SRCS qgsrenderchecker.cpp)
77
# the UI file won't be wrapped!
88
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
99
${CMAKE_CURRENT_BINARY_DIR}
10-
${CMAKE_CURRENT_SOURCE_DIR}/../../../src/core
11-
${CMAKE_CURRENT_SOURCE_DIR}/../../../src/core/raster
10+
${CMAKE_SOURCE_DIR}/src/core
11+
${CMAKE_SOURCE_DIR}/src/core/raster
12+
${CMAKE_SOURCE_DIR}/src/core/renderer
13+
${CMAKE_SOURCE_DIR}/src/core/symbology
14+
${CMAKE_SOURCE_DIR}/src/core/symbology-ng
1215
${QT_INCLUDE_DIR}
1316
${GDAL_INCLUDE_DIR}
1417
${PROJ_INCLUDE_DIR}
@@ -113,3 +116,6 @@ ADD_QGIS_TEST(geometrytest testqgsgeometry.cpp)
113116
ADD_QGIS_TEST(coordinatereferencesystemtest testqgscoordinatereferencesystem.cpp)
114117
ADD_QGIS_TEST(pointtest testqgspoint.cpp)
115118
ADD_QGIS_TEST(searchstringtest testqgssearchstring.cpp)
119+
120+
ADD_QGIS_TEST(renderingbenchmark rendering_benchmark.cpp)
121+

0 commit comments

Comments
 (0)