Skip to content

Commit 4bbe318

Browse files
committed
[symbology] Remove distorted star symbol
1 parent 6df1f68 commit 4bbe318

File tree

7 files changed

+6
-22
lines changed

7 files changed

+6
-22
lines changed

python/core/symbology-ng/qgsmarkersymbollayerv2.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class QgsSimpleMarkerSymbolLayerV2 : QgsMarkerSymbolLayerV2
88

99
/** Constructor for QgsSimpleMarkerSymbolLayerV2.
1010
* @param name symbol name, should be one of "square", "rectangle", "diamond",
11-
* "pentagon", "triangle", "equilateral_triangle", "star", "regular_star", "arrow",
11+
* "pentagon", "triangle", "equilateral_triangle", "star", "arrow",
1212
* "circle", "cross", "cross2", "line", "x", "arrowhead", "filled_arrowhead",
1313
* "semi_circle", "third_circle", "quarter_circle", "quarter_square", "half_square",
1414
* "diagonal_half_square", "right_half_triangle", "left_half_triangle"

scripts/generate_test_mask_image.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import os
99
import sys
1010
import argparse
11-
from PyQt.QtGui import QImage, QColor, qRed, qBlue, qGreen, qAlpha, qRgb
11+
from PyQt4.QtGui import QImage, QColor, qRed, qBlue, qGreen, qAlpha, qRgb
1212
import struct
1313
import urllib2
1414
import glob

src/core/symbology-ng/qgsmarkersymbollayerv2.cpp

+1-17
Original file line numberDiff line numberDiff line change
@@ -394,23 +394,7 @@ bool QgsSimpleMarkerSymbolLayerV2::prepareShape( const QString& name, QPolygonF
394394
polygon << QPointF( -1, 1 ) << QPointF( 0, 1 ) << QPointF( 0, -1 );
395395
return true;
396396
}
397-
else if ( name == "star" )
398-
{
399-
double sixth = 1.0 / 3;
400-
401-
polygon << QPointF( 0, -1 )
402-
<< QPointF( -sixth, -sixth )
403-
<< QPointF( -1, -sixth )
404-
<< QPointF( -sixth, 0 )
405-
<< QPointF( -1, 1 )
406-
<< QPointF( 0, + sixth )
407-
<< QPointF( 1, 1 )
408-
<< QPointF( + sixth, 0 )
409-
<< QPointF( 1, -sixth )
410-
<< QPointF( + sixth, -sixth );
411-
return true;
412-
}
413-
else if ( name == "regular_star" )
397+
else if ( name == "star" || name == "regular_star" )
414398
{
415399
double inner_r = cos( DEG2RAD( 72.0 ) ) / cos( DEG2RAD( 36.0 ) );
416400

src/core/symbology-ng/qgsmarkersymbollayerv2.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class CORE_EXPORT QgsSimpleMarkerSymbolLayerV2 : public QgsMarkerSymbolLayerV2
3838

3939
/** Constructor for QgsSimpleMarkerSymbolLayerV2.
4040
* @param name symbol name, should be one of "square", "rectangle", "diamond",
41-
* "pentagon", "triangle", "equilateral_triangle", "star", "regular_star", "arrow",
41+
* "pentagon", "triangle", "equilateral_triangle", "star", "arrow",
4242
* "circle", "cross", "cross2", "line", "x", "arrowhead", "filled_arrowhead",
4343
* "semi_circle", "third_circle", "quarter_circle", "quarter_square", "half_square",
4444
* "diagonal_half_square", "right_half_triangle", "left_half_triangle"

src/gui/symbology-ng/qgssymbollayerv2widget.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ QgsSimpleMarkerSymbolLayerV2Widget::QgsSimpleMarkerSymbolLayerV2Widget( const Qg
441441
QSize size = lstNames->iconSize();
442442
QStringList names;
443443
names << "circle" << "rectangle" << "diamond" << "pentagon" << "cross" << "cross2" << "triangle" << "equilateral_triangle" << "star"
444-
<< "regular_star" << "arrow" << "line" << "arrowhead" << "filled_arrowhead" << "semi_circle" << "third_circle" << "quarter_circle"
444+
<< "arrow" << "line" << "arrowhead" << "filled_arrowhead" << "semi_circle" << "third_circle" << "quarter_circle"
445445
<< "quarter_square" << "half_square" << "diagonal_half_square" << "right_half_triangle" << "left_half_triangle";
446446
double markerSize = DEFAULT_POINT_SIZE * 2;
447447
Q_FOREACH ( const QString& name, names )
@@ -541,7 +541,7 @@ void QgsSimpleMarkerSymbolLayerV2Widget::setSymbolLayer( QgsSymbolLayerV2* layer
541541

542542
registerDataDefinedButton( mNameDDBtn, "name", QgsDataDefinedButton::String, tr( "string " ) + QLatin1String( "[<b>square</b>|<b>rectangle</b>|<b>diamond</b>|"
543543
"<b>pentagon</b>|<b>triangle</b>|<b>equilateral_triangle</b>|"
544-
"<b>star</b>|<b>regular_star</b>|<b>arrow</b>|<b>filled_arrowhead</b>|"
544+
"<b>star</b>|<b>arrow</b>|<b>filled_arrowhead</b>|"
545545
"<b>circle</b>|<b>cross</b>|<b>x</b>|"
546546
"<b>cross2</b>|<b>line</b>|<b>arrowhead</b>|<b>semi_circle</b>|<b>third_circle</b>|<b>quarter_circle</b>|"
547547
"<b>quarter_square</b>|<b>half_square</b>|<b>diagonal_half_square</b>|<b>right_half_triangle</b>|<b>left_half_triangle</b>]" ) );

0 commit comments

Comments
 (0)