Skip to content

Commit

Permalink
Dxf export: fix data defined properties in simple marker
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Mar 26, 2018
1 parent b335661 commit afdc9b6
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions src/core/symbology-ng/qgsmarkersymbollayerv2.cpp
Expand Up @@ -1296,13 +1296,9 @@ bool QgsSimpleMarkerSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitSc
break;
}
}

size = QgsSymbolLayerV2Utils::convertToPainterUnits( context.renderContext(), size, mSizeUnit, mSizeMapUnitScale );
}
if ( mSizeUnit == QgsSymbolV2::MM )
{
size *= mmMapUnitScaleFactor;
}

size *= e.mapUnitScaleFactor( e.symbologyScaleDenominator(), mSizeUnit, e.mapUnits() );
double halfSize = size / 2.0;

//outlineWidth
Expand All @@ -1313,10 +1309,7 @@ bool QgsSimpleMarkerSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitSc
context.setOriginalValueVariable( mOutlineWidth );
outlineWidth = evaluateDataDefinedProperty( QgsSymbolLayerV2::EXPR_OUTLINE_WIDTH, context, mOutlineWidth ).toDouble();
}
if ( mSizeUnit == QgsSymbolV2::MM )
{
outlineWidth *= mmMapUnitScaleFactor;
}
outlineWidth *= e.mapUnitScaleFactor( e.symbologyScaleDenominator(), mSizeUnit, e.mapUnits() );

//color
QColor pc = mPen.color();
Expand Down Expand Up @@ -1368,10 +1361,7 @@ bool QgsSimpleMarkerSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitSc
if ( angle )
off = _rotatedOffset( off, angle );

if ( mSizeUnit == QgsSymbolV2::MM )
{
off *= mmMapUnitScaleFactor;
}
off *= e.mapUnitScaleFactor( e.symbologyScaleDenominator(), mSizeUnit, e.mapUnits() );

QTransform t;
t.translate( shift.x() + offsetX, shift.y() + offsetY );
Expand Down

0 comments on commit afdc9b6

Please sign in to comment.