Skip to content

Commit

Permalink
Added arrowheads (filled and unfilled) to simple markers
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@14837 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Dec 4, 2010
1 parent f99179e commit 0dacde9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions src/core/symbology-ng/qgsmarkersymbollayerv2.cpp
Expand Up @@ -281,6 +281,11 @@ bool QgsSimpleMarkerSymbolLayerV2::prepareShape()
<< QPointF( -0.5, -0.5 );
return true;
}
else if ( mName == "filled_arrowhead" )
{
mPolygon << QPointF( 0, 0 ) << QPointF( -1, 1 ) << QPointF( -1, -1 );
return true;
}

return false;
}
Expand Down Expand Up @@ -316,6 +321,14 @@ bool QgsSimpleMarkerSymbolLayerV2::preparePath()
mPath.lineTo( 0, 1 ); // vertical line
return true;
}
else if ( mName == "arrowhead" )
{
mPath.moveTo( 0, 0 );
mPath.lineTo( -1, -1 );
mPath.moveTo( 0, 0 );
mPath.lineTo( -1, 1 );
return true;
}

return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/symbology-ng/qgssymbollayerv2widget.cpp
Expand Up @@ -155,7 +155,7 @@ QgsSimpleMarkerSymbolLayerV2Widget::QgsSimpleMarkerSymbolLayerV2Widget( QWidget*
QSize size = lstNames->iconSize();
QStringList names;
names << "circle" << "rectangle" << "diamond" << "pentagon" << "cross" << "cross2" << "triangle"
<< "equilateral_triangle" << "star" << "regular_star" << "arrow" << "line";
<< "equilateral_triangle" << "star" << "regular_star" << "arrow" << "line" << "arrowhead" << "filled_arrowhead";
double markerSize = DEFAULT_POINT_SIZE * 2;
for ( int i = 0; i < names.count(); ++i )
{
Expand Down

0 comments on commit 0dacde9

Please sign in to comment.