Skip to content

Commit 0dacde9

Browse files
author
wonder
committed
Added arrowheads (filled and unfilled) to simple markers
git-svn-id: http://svn.osgeo.org/qgis/trunk@14837 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent f99179e commit 0dacde9

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/core/symbology-ng/qgsmarkersymbollayerv2.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,11 @@ bool QgsSimpleMarkerSymbolLayerV2::prepareShape()
281281
<< QPointF( -0.5, -0.5 );
282282
return true;
283283
}
284+
else if ( mName == "filled_arrowhead" )
285+
{
286+
mPolygon << QPointF( 0, 0 ) << QPointF( -1, 1 ) << QPointF( -1, -1 );
287+
return true;
288+
}
284289

285290
return false;
286291
}
@@ -316,6 +321,14 @@ bool QgsSimpleMarkerSymbolLayerV2::preparePath()
316321
mPath.lineTo( 0, 1 ); // vertical line
317322
return true;
318323
}
324+
else if ( mName == "arrowhead" )
325+
{
326+
mPath.moveTo( 0, 0 );
327+
mPath.lineTo( -1, -1 );
328+
mPath.moveTo( 0, 0 );
329+
mPath.lineTo( -1, 1 );
330+
return true;
331+
}
319332

320333
return false;
321334
}

src/gui/symbology-ng/qgssymbollayerv2widget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ QgsSimpleMarkerSymbolLayerV2Widget::QgsSimpleMarkerSymbolLayerV2Widget( QWidget*
155155
QSize size = lstNames->iconSize();
156156
QStringList names;
157157
names << "circle" << "rectangle" << "diamond" << "pentagon" << "cross" << "cross2" << "triangle"
158-
<< "equilateral_triangle" << "star" << "regular_star" << "arrow" << "line";
158+
<< "equilateral_triangle" << "star" << "regular_star" << "arrow" << "line" << "arrowhead" << "filled_arrowhead";
159159
double markerSize = DEFAULT_POINT_SIZE * 2;
160160
for ( int i = 0; i < names.count(); ++i )
161161
{

0 commit comments

Comments
 (0)