Skip to content

Commit 26ca54d

Browse files
author
homann
committed
Added hard:arrow marker
git-svn-id: http://svn.osgeo.org/qgis/trunk@9552 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 6d5261b commit 26ca54d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/core/symbology/qgsmarkercatalogue.cpp

+17
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ QgsMarkerCatalogue::QgsMarkerCatalogue()
5050
mList.append( "hard:cross2" );
5151
mList.append( "hard:triangle" );
5252
mList.append( "hard:star" );
53+
mList.append( "hard:arrow" );
5354

5455
// SVG
5556
QString svgPath = QgsApplication::svgPath();
@@ -289,5 +290,21 @@ void QgsMarkerCatalogue::hardMarker( QPainter * thepPainter, QString name, doubl
289290
pa.setPoint( 9, x_c + oneSixth, y_c - oneSixth );
290291
thepPainter->drawPolygon( pa );
291292
}
293+
294+
else if (name == "arrow")
295+
{
296+
int oneEight = r / 4;
297+
int quarter = r / 2;
298+
299+
QPolygon pa(7);
300+
pa.setPoint( 0, x_c, y_c - r );
301+
pa.setPoint( 1, x_c + quarter, y_c - quarter );
302+
pa.setPoint( 2, x_c + oneEight, y_c - quarter );
303+
pa.setPoint( 3, x_c + oneEight, y_c + r );
304+
pa.setPoint( 4, x_c - oneEight, y_c + r );
305+
pa.setPoint( 5, x_c - oneEight, y_c - quarter );
306+
pa.setPoint( 6, x_c - quarter, y_c - quarter );
307+
thepPainter->drawPolygon ( pa );
308+
}
292309
thepPainter->end();
293310
}

0 commit comments

Comments
 (0)