@@ -2344,11 +2344,6 @@ bool QgsSvgMarkerSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitScale
2344
2344
}
2345
2345
double offsetX = offset.x ();
2346
2346
double offsetY = offset.y ();
2347
- if ( mSizeUnit == QgsSymbolV2::MM )
2348
- {
2349
- offsetX *= mmMapUnitScaleFactor;
2350
- offsetY *= mmMapUnitScaleFactor;
2351
- }
2352
2347
2353
2348
QPointF outputOffset ( offsetX, offsetY );
2354
2349
@@ -2362,6 +2357,8 @@ bool QgsSvgMarkerSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitScale
2362
2357
if ( angle )
2363
2358
outputOffset = _rotatedOffset ( outputOffset, angle );
2364
2359
2360
+ outputOffset *= e.mapUnitScaleFactor ( e.symbologyScaleDenominator (), mOffsetUnit , e.mapUnits () );
2361
+
2365
2362
QString path = mPath ;
2366
2363
if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_NAME ) )
2367
2364
{
@@ -2375,7 +2372,7 @@ bool QgsSvgMarkerSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitScale
2375
2372
context.setOriginalValueVariable ( mOutlineWidth );
2376
2373
outlineWidth = evaluateDataDefinedProperty ( QgsSymbolLayerV2::EXPR_OUTLINE_WIDTH, context, mOutlineWidth ).toDouble ();
2377
2374
}
2378
- outlineWidth = QgsSymbolLayerV2Utils::convertToPainterUnits ( context. renderContext (), outlineWidth, mOutlineWidthUnit , mOutlineWidthMapUnitScale );
2375
+ outlineWidth *= e. mapUnitScaleFactor ( e. symbologyScaleDenominator (), mOutlineWidthUnit , e. mapUnits () );
2379
2376
2380
2377
QColor fillColor = mColor ;
2381
2378
if ( hasDataDefinedProperty ( QgsSymbolLayerV2::EXPR_FILL ) )
@@ -2419,7 +2416,7 @@ bool QgsSvgMarkerSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitScale
2419
2416
p.rotate ( angle );
2420
2417
p.translate ( -r.defaultSize ().width () / 2.0 , -r.defaultSize ().height () / 2.0 );
2421
2418
}
2422
- pd.setShift ( shift );
2419
+ pd.setShift ( shift + QPointF ( outputOffset. x (), -outputOffset. y () ) );
2423
2420
pd.setOutputSize ( QRectF ( -halfSize, -halfSize, size, size ) );
2424
2421
pd.setLayer ( layerName );
2425
2422
r.render ( &p );
0 commit comments