mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Implement simple marker rect / square
This commit is contained in:
parent
de6f83e08f
commit
222946b36a
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
//////////
|
||||
|
Loading…
x
Reference in New Issue
Block a user