mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-09 00:08:52 -04:00
[symbology] Remove distorted star symbol
This commit is contained in:
parent
6df1f6866c
commit
4bbe318c20
@ -8,7 +8,7 @@ class QgsSimpleMarkerSymbolLayerV2 : QgsMarkerSymbolLayerV2
|
|||||||
|
|
||||||
/** Constructor for QgsSimpleMarkerSymbolLayerV2.
|
/** Constructor for QgsSimpleMarkerSymbolLayerV2.
|
||||||
* @param name symbol name, should be one of "square", "rectangle", "diamond",
|
* @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",
|
* "circle", "cross", "cross2", "line", "x", "arrowhead", "filled_arrowhead",
|
||||||
* "semi_circle", "third_circle", "quarter_circle", "quarter_square", "half_square",
|
* "semi_circle", "third_circle", "quarter_circle", "quarter_square", "half_square",
|
||||||
* "diagonal_half_square", "right_half_triangle", "left_half_triangle"
|
* "diagonal_half_square", "right_half_triangle", "left_half_triangle"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import argparse
|
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 struct
|
||||||
import urllib2
|
import urllib2
|
||||||
import glob
|
import glob
|
||||||
|
@ -394,23 +394,7 @@ bool QgsSimpleMarkerSymbolLayerV2::prepareShape( const QString& name, QPolygonF
|
|||||||
polygon << QPointF( -1, 1 ) << QPointF( 0, 1 ) << QPointF( 0, -1 );
|
polygon << QPointF( -1, 1 ) << QPointF( 0, 1 ) << QPointF( 0, -1 );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if ( name == "star" )
|
else if ( name == "star" || name == "regular_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" )
|
|
||||||
{
|
{
|
||||||
double inner_r = cos( DEG2RAD( 72.0 ) ) / cos( DEG2RAD( 36.0 ) );
|
double inner_r = cos( DEG2RAD( 72.0 ) ) / cos( DEG2RAD( 36.0 ) );
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ class CORE_EXPORT QgsSimpleMarkerSymbolLayerV2 : public QgsMarkerSymbolLayerV2
|
|||||||
|
|
||||||
/** Constructor for QgsSimpleMarkerSymbolLayerV2.
|
/** Constructor for QgsSimpleMarkerSymbolLayerV2.
|
||||||
* @param name symbol name, should be one of "square", "rectangle", "diamond",
|
* @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",
|
* "circle", "cross", "cross2", "line", "x", "arrowhead", "filled_arrowhead",
|
||||||
* "semi_circle", "third_circle", "quarter_circle", "quarter_square", "half_square",
|
* "semi_circle", "third_circle", "quarter_circle", "quarter_square", "half_square",
|
||||||
* "diagonal_half_square", "right_half_triangle", "left_half_triangle"
|
* "diagonal_half_square", "right_half_triangle", "left_half_triangle"
|
||||||
|
@ -441,7 +441,7 @@ QgsSimpleMarkerSymbolLayerV2Widget::QgsSimpleMarkerSymbolLayerV2Widget( const Qg
|
|||||||
QSize size = lstNames->iconSize();
|
QSize size = lstNames->iconSize();
|
||||||
QStringList names;
|
QStringList names;
|
||||||
names << "circle" << "rectangle" << "diamond" << "pentagon" << "cross" << "cross2" << "triangle" << "equilateral_triangle" << "star"
|
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";
|
<< "quarter_square" << "half_square" << "diagonal_half_square" << "right_half_triangle" << "left_half_triangle";
|
||||||
double markerSize = DEFAULT_POINT_SIZE * 2;
|
double markerSize = DEFAULT_POINT_SIZE * 2;
|
||||||
Q_FOREACH ( const QString& name, names )
|
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>|"
|
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>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>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>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>]" ) );
|
"<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 |
Loading…
x
Reference in New Issue
Block a user