Skip to content
Permalink
Browse files

Dxf export: fix offset direction and consider simple marker offset al…

…so for circles
  • Loading branch information
mhugent committed Mar 26, 2018
1 parent afdc9b6 commit 2235bf5050a1f3f3eaa21a7d5b7e1b1ce841a6c4
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/core/symbology-ng/qgsmarkersymbollayerv2.cpp
@@ -1270,6 +1270,8 @@ void QgsSimpleMarkerSymbolLayerV2::drawMarker( QPainter* p, QgsSymbolV2RenderCon

bool QgsSimpleMarkerSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitScaleFactor, const QString& layerName, QgsSymbolV2RenderContext &context, QPointF shift ) const
{
Q_UNUSED( mmMapUnitScaleFactor );

//data defined size?
double size = mSize;

@@ -1364,7 +1366,7 @@ bool QgsSimpleMarkerSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitSc
off *= e.mapUnitScaleFactor( e.symbologyScaleDenominator(), mSizeUnit, e.mapUnits() );

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

if ( !qgsDoubleNear( angle, 0.0 ) )
t.rotate( angle );
@@ -1388,6 +1390,7 @@ bool QgsSimpleMarkerSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitSc
}
else if ( shape == Circle )
{
shift += QPointF( off.x(), -off.y() );
if ( mBrush.style() != Qt::NoBrush )
e.writeFilledCircle( layerName, bc, QgsPointV2( shift ), halfSize );
if ( mPen.style() != Qt::NoPen )

0 comments on commit 2235bf5

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