Skip to content
Permalink
Browse files

[symbology] add diamond ellipse marker

  • Loading branch information
nirvn committed Apr 13, 2016
1 parent b7a4e20 commit 7c779aea3c6c45e0509d8b935de274fb2f2e07d7
@@ -597,6 +597,14 @@ void QgsEllipseSymbolLayerV2::preparePath( const QString& symbolName, QgsSymbolV
{
mPainterPath.addRect( QRectF( -size.width() / 2.0, -size.height() / 2.0, size.width(), size.height() ) );
}
else if ( symbolName == "diamond" )
{
mPainterPath.moveTo( -size.width() / 2.0, 0 );
mPainterPath.lineTo( 0, size.height() / 2.0 );
mPainterPath.lineTo( size.width() / 2.0, 0 );
mPainterPath.lineTo( 0, -size.height() / 2.0 );
mPainterPath.lineTo( -size.width() / 2.0, 0 );
}
else if ( symbolName == "cross" )
{
mPainterPath.moveTo( 0, -size.height() / 2.0 );
@@ -896,7 +896,7 @@ QString QgsDataDefinedButton::fillStyleDesc()

QString QgsDataDefinedButton::markerStyleDesc()
{
return trString() + QLatin1String( "[<b>circle</b>|<b>rectangle</b>|<b>cross</b>|<b>triangle"
return trString() + QLatin1String( "[<b>circle</b>|<b>rectangle</b>|<b>diamond</b>|<b>cross</b>|<b>triangle"
"</b>|<b>right_half_triangle</b>|<b>left_half_triangle</b>|<b>semi_circle</b>]" );
}

@@ -46,7 +46,7 @@ QgsEllipseSymbolLayerV2Widget::QgsEllipseSymbolLayerV2Widget( const QgsVectorLay
mRotationSpinBox->setClearValue( 0.0 );

QStringList names;
names << "circle" << "rectangle" << "cross" << "triangle" << "right_half_triangle" << "left_half_triangle" << "semi_circle";
names << "circle" << "rectangle" << "diamond" << "cross" << "triangle" << "right_half_triangle" << "left_half_triangle" << "semi_circle";
QSize iconSize = mShapeListWidget->iconSize();

Q_FOREACH ( const QString& name, names )

0 comments on commit 7c779ae

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