Skip to content
Permalink
Browse files

Fix line offset dxf export

  • Loading branch information
mhugent committed Apr 12, 2018
1 parent b73ac0f commit f5c03db78b1d7e94611ecc99d4d6769687ce71da
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/core/symbology-ng/qgslinesymbollayerv2.cpp
@@ -654,7 +654,13 @@ double QgsSimpleLineSymbolLayerV2::dxfOffset( const QgsDxfExport& e, QgsSymbolV2
context.setOriginalValueVariable( mOffset );
offset = evaluateDataDefinedProperty( QgsSymbolLayerV2::EXPR_OFFSET, context, mOffset ).toDouble();
}
return offset;

offset *= e.mapUnitScaleFactor( e.symbologyScaleDenominator(), offsetUnit(), e.mapUnits(), context.renderContext().mapToPixel().mapUnitsPerPixel() );
if ( mOffsetUnit == QgsSymbolV2::MapUnit )
{
e.clipValueToMapUnitScale( offset, mOffsetMapUnitScale, context.renderContext().scaleFactor() );
}
return -offset; //direction seems to be inverse to symbology offset
}

/////////

0 comments on commit f5c03db

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