Skip to content
Permalink
Browse files
Use size scale also for line symbols to modify line width.
Developed for Faunalia (http://www.faunalia.it) with funding from Regione Toscana - Sistema Informativo per la Gestione del Territorio e dell' Ambiente [RT-SIGTA].
For the project: "Sviluppo di prodotti software GIS open-source basati sui prodotti QuantumGIS e Postgis (CIG 037728516E)"


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13947 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Jul 20, 2010
1 parent 1186807 commit 8445813639e3e92b8d7f0b2f0186fcf58b4e1153
Showing with 12 additions and 1 deletion.
  1. +12 −1 src/core/symbology-ng/qgslinesymbollayerv2.cpp
@@ -102,6 +102,13 @@ void QgsSimpleLineSymbolLayerV2::renderPolyline( const QPolygonF& points, QgsSym
return;
}

if ( context.renderHints() & QgsSymbolV2::DataDefinedSizeScale )
{
double scaledWidth = context.outputLineWidth( mWidth );
mPen.setWidthF( scaledWidth );
mSelPen.setWidthF( scaledWidth );
}

p->setPen( context.selected() ? mSelPen : mPen );
if ( mOffset == 0 )
{
@@ -250,8 +257,12 @@ void QgsMarkerLineSymbolLayerV2::startRender( QgsSymbolV2RenderContext& context
mMarker->setOutputUnit( context.outputUnit() );

// if being rotated, it gets initialized with every line segment
int hints = 0;
if ( mRotateMarker )
mMarker->setRenderHints( QgsSymbolV2::DataDefinedRotation );
hints |= QgsSymbolV2::DataDefinedRotation;
if ( context.renderHints() & QgsSymbolV2::DataDefinedSizeScale )
hints |= QgsSymbolV2::DataDefinedSizeScale;
mMarker->setRenderHints( hints );

mMarker->startRender( context.renderContext() );
}

0 comments on commit 8445813

Please sign in to comment.