Skip to content
Permalink
Browse files

Implement simple marker rect / square

  • Loading branch information
mhugent committed Nov 21, 2013
1 parent de6f83e commit 222946b36a63b573713a748288ea36f7f8565afc
Showing with 21 additions and 2 deletions.
  1. +21 −2 src/core/symbology-ng/qgsmarkersymbollayerv2.cpp
@@ -709,18 +709,37 @@ void QgsSimpleMarkerSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitSc
size *= mmMapUnitScaleFactor;
}
double halfSize = size / 2.0;
int colorIndex = QgsDxfExport::closestColorMatch( mBrush.color().rgb() );

if ( mName == "circle" )
{
e.writeGroup( 0, "CIRCLE" );
e.writeGroup( 8, 0 );
int colorIndex = QgsDxfExport::closestColorMatch( mBrush.color().rgb() );
e.writeGroup( 8, "0" );

e.writeGroup( 62, colorIndex );
e.writeGroup( 10, halfSize );
e.writeGroup( 20, halfSize );
e.writeGroup( 30, 0.0 );
e.writeGroup( 40, halfSize );
}
else if ( mName == "square" || mName == "rectangle" )
{
e.writeGroup( 0, "SOLID" );
e.writeGroup( 8, "0" );
e.writeGroup( 62, colorIndex );
e.writeGroup( 10, 0.0 );
e.writeGroup( 20, 0.0 );
e.writeGroup( 30, 0.0 );
e.writeGroup( 11, size );
e.writeGroup( 21, 0.0 );
e.writeGroup( 31, 0.0 );
e.writeGroup( 12, 0 );
e.writeGroup( 22, size );
e.writeGroup( 32, 0.0 );
e.writeGroup( 13, size );
e.writeGroup( 23, size );
e.writeGroup( 33, 0.0 );
}
}

//////////

0 comments on commit 222946b

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