Skip to content

Commit

Permalink
Dash dot pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Dec 21, 2012
1 parent 1a79041 commit fa5cb77
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/core/symbology-ng/qgslinesymbollayerv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,24 @@ QString QgsSimpleLineSymbolLayerV2::ogrFeatureStyle( double widthScaleFactor ) c
symbolStyle.append( ",w:" );
//dxf driver writes ground units as mm? Should probably be changed in ogr
symbolStyle.append( QString::number( mWidth * widthScaleFactor ) );
symbolStyle.append( "g" );
symbolStyle.append( "mm" );

//dash dot vector
if ( mCustomDashVector.size() > 0 )
{
symbolStyle.append( ",p:\"" );
QVector<qreal>::const_iterator pIt = mCustomDashVector.constBegin();
for ( ; pIt != mCustomDashVector.constEnd(); ++pIt )
{
if ( pIt != mCustomDashVector.constBegin() )
{
symbolStyle.append( " " );
}
symbolStyle.append( QString::number( *pIt * widthScaleFactor ) );
symbolStyle.append( "mm" );
}
symbolStyle.append( "\"" );
}
symbolStyle.append( ")" );

return symbolStyle;
Expand Down

0 comments on commit fa5cb77

Please sign in to comment.