Skip to content

Commit ab70ec9

Browse files
committedOct 10, 2015
Scale svg marker outline width to match context
This is a partial fix for #11522, in that it fixes map unit scaling for outline width. The width is still too small and incorrectly scales with symbol size. (refs #11522)
1 parent d8cd15e commit ab70ec9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎src/core/symbology-ng/qgsmarkersymbollayerv2.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,6 +1290,7 @@ void QgsSvgMarkerSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV2Re
12901290
context.setOriginalValueVariable( mOutlineWidth );
12911291
outlineWidth = evaluateDataDefinedProperty( QgsSymbolLayerV2::EXPR_OUTLINE_WIDTH, context, mOutlineWidth ).toDouble();
12921292
}
1293+
outlineWidth = QgsSymbolLayerV2Utils::convertToPainterUnits( context.renderContext(), outlineWidth, mOutlineWidthUnit, mOutlineWidthMapUnitScale );
12931294

12941295
QColor fillColor = mFillColor;
12951296
if ( hasDataDefinedProperty( QgsSymbolLayerV2::EXPR_FILL ) )
@@ -1595,6 +1596,7 @@ bool QgsSvgMarkerSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitScale
15951596
context->setOriginalValueVariable( mOutlineWidth );
15961597
outlineWidth = evaluateDataDefinedProperty( QgsSymbolLayerV2::EXPR_OUTLINE_WIDTH, *context, mOutlineWidth ).toDouble();
15971598
}
1599+
outlineWidth = QgsSymbolLayerV2Utils::convertToPainterUnits( context->renderContext(), outlineWidth, mOutlineWidthUnit, mOutlineWidthMapUnitScale );
15981600

15991601
QColor fillColor = mFillColor;
16001602
if ( hasDataDefinedProperty( QgsSymbolLayerV2::EXPR_FILL ) )

0 commit comments

Comments
 (0)
Failed to load comments.