[symbology] Remove distorted star symbol

This commit is contained in:
Nyall Dawson 2016-04-11 08:49:44 +10:00
parent 6df1f6866c
commit 4bbe318c20
7 changed files with 6 additions and 22 deletions

View File

@ -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"

View File

@ -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

View File

@ -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 ) );

View File

@ -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"

View File

@ -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 )
@ -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>]" ) );

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 520 B