Skip to content
Permalink
Browse files

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)
  • Loading branch information
nyalldawson committed Oct 10, 2015
1 parent d8cd15e commit ab70ec99bc935e03a241f502f55ad64a8f989b55
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/core/symbology-ng/qgsmarkersymbollayerv2.cpp
@@ -1290,6 +1290,7 @@ void QgsSvgMarkerSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV2Re
context.setOriginalValueVariable( mOutlineWidth );
outlineWidth = evaluateDataDefinedProperty( QgsSymbolLayerV2::EXPR_OUTLINE_WIDTH, context, mOutlineWidth ).toDouble();
}
outlineWidth = QgsSymbolLayerV2Utils::convertToPainterUnits( context.renderContext(), outlineWidth, mOutlineWidthUnit, mOutlineWidthMapUnitScale );

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

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

1 comment on commit ab70ec9

@nyalldawson

This comment has been minimized.

Copy link
Collaborator Author

@nyalldawson nyalldawson commented on ab70ec9 Oct 10, 2015

I realise this commit has temporarily broken some Travis tests - will update the reference images when I've fully solved 11522

Please sign in to comment.
You can’t perform that action at this time.