Skip to content
Permalink
Browse files
Dxf export: fix data defined properties in simple marker
  • Loading branch information
mhugent committed Mar 26, 2018
1 parent b335661 commit afdc9b6
Showing 1 changed file with 4 additions and 14 deletions.
@@ -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
@@ -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();
@@ -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 );

0 comments on commit afdc9b6

Please sign in to comment.