Skip to content

Commit

Permalink
[symbology] Remove distorted star symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 12, 2016
1 parent 6df1f68 commit 4bbe318
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 22 deletions.
2 changes: 1 addition & 1 deletion python/core/symbology-ng/qgsmarkersymbollayerv2.sip
Expand Up @@ -8,7 +8,7 @@ class QgsSimpleMarkerSymbolLayerV2 : QgsMarkerSymbolLayerV2

/** Constructor for QgsSimpleMarkerSymbolLayerV2.
* @param name symbol name, should be one of "square", "rectangle", "diamond",
* "pentagon", "triangle", "equilateral_triangle", "star", "regular_star", "arrow",
* "pentagon", "triangle", "equilateral_triangle", "star", "arrow",
* "circle", "cross", "cross2", "line", "x", "arrowhead", "filled_arrowhead",
* "semi_circle", "third_circle", "quarter_circle", "quarter_square", "half_square",
* "diagonal_half_square", "right_half_triangle", "left_half_triangle"
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate_test_mask_image.py
Expand Up @@ -8,7 +8,7 @@
import os
import sys
import argparse
from PyQt.QtGui import QImage, QColor, qRed, qBlue, qGreen, qAlpha, qRgb
from PyQt4.QtGui import QImage, QColor, qRed, qBlue, qGreen, qAlpha, qRgb
import struct
import urllib2
import glob
Expand Down
18 changes: 1 addition & 17 deletions src/core/symbology-ng/qgsmarkersymbollayerv2.cpp
Expand Up @@ -394,23 +394,7 @@ bool QgsSimpleMarkerSymbolLayerV2::prepareShape( const QString& name, QPolygonF
polygon << QPointF( -1, 1 ) << QPointF( 0, 1 ) << QPointF( 0, -1 );
return true;
}
else if ( name == "star" )
{
double sixth = 1.0 / 3;

polygon << QPointF( 0, -1 )
<< QPointF( -sixth, -sixth )
<< QPointF( -1, -sixth )
<< QPointF( -sixth, 0 )
<< QPointF( -1, 1 )
<< QPointF( 0, + sixth )
<< QPointF( 1, 1 )
<< QPointF( + sixth, 0 )
<< QPointF( 1, -sixth )
<< QPointF( + sixth, -sixth );
return true;
}
else if ( name == "regular_star" )
else if ( name == "star" || name == "regular_star" )
{
double inner_r = cos( DEG2RAD( 72.0 ) ) / cos( DEG2RAD( 36.0 ) );

Expand Down
2 changes: 1 addition & 1 deletion src/core/symbology-ng/qgsmarkersymbollayerv2.h
Expand Up @@ -38,7 +38,7 @@ class CORE_EXPORT QgsSimpleMarkerSymbolLayerV2 : public QgsMarkerSymbolLayerV2

/** Constructor for QgsSimpleMarkerSymbolLayerV2.
* @param name symbol name, should be one of "square", "rectangle", "diamond",
* "pentagon", "triangle", "equilateral_triangle", "star", "regular_star", "arrow",
* "pentagon", "triangle", "equilateral_triangle", "star", "arrow",
* "circle", "cross", "cross2", "line", "x", "arrowhead", "filled_arrowhead",
* "semi_circle", "third_circle", "quarter_circle", "quarter_square", "half_square",
* "diagonal_half_square", "right_half_triangle", "left_half_triangle"
Expand Down
4 changes: 2 additions & 2 deletions src/gui/symbology-ng/qgssymbollayerv2widget.cpp
Expand Up @@ -441,7 +441,7 @@ QgsSimpleMarkerSymbolLayerV2Widget::QgsSimpleMarkerSymbolLayerV2Widget( const Qg
QSize size = lstNames->iconSize();
QStringList names;
names << "circle" << "rectangle" << "diamond" << "pentagon" << "cross" << "cross2" << "triangle" << "equilateral_triangle" << "star"
<< "regular_star" << "arrow" << "line" << "arrowhead" << "filled_arrowhead" << "semi_circle" << "third_circle" << "quarter_circle"
<< "arrow" << "line" << "arrowhead" << "filled_arrowhead" << "semi_circle" << "third_circle" << "quarter_circle"
<< "quarter_square" << "half_square" << "diagonal_half_square" << "right_half_triangle" << "left_half_triangle";
double markerSize = DEFAULT_POINT_SIZE * 2;
Q_FOREACH ( const QString& name, names )
Expand Down Expand Up @@ -541,7 +541,7 @@ void QgsSimpleMarkerSymbolLayerV2Widget::setSymbolLayer( QgsSymbolLayerV2* layer

registerDataDefinedButton( mNameDDBtn, "name", QgsDataDefinedButton::String, tr( "string " ) + QLatin1String( "[<b>square</b>|<b>rectangle</b>|<b>diamond</b>|"
"<b>pentagon</b>|<b>triangle</b>|<b>equilateral_triangle</b>|"
"<b>star</b>|<b>regular_star</b>|<b>arrow</b>|<b>filled_arrowhead</b>|"
"<b>star</b>|<b>arrow</b>|<b>filled_arrowhead</b>|"
"<b>circle</b>|<b>cross</b>|<b>x</b>|"
"<b>cross2</b>|<b>line</b>|<b>arrowhead</b>|<b>semi_circle</b>|<b>third_circle</b>|<b>quarter_circle</b>|"
"<b>quarter_square</b>|<b>half_square</b>|<b>diagonal_half_square</b>|<b>right_half_triangle</b>|<b>left_half_triangle</b>]" ) );
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4bbe318

Please sign in to comment.