Skip to content
Permalink
Browse files
Added hard:arrow marker
git-svn-id: http://svn.osgeo.org/qgis/trunk@9552 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
homann committed Oct 27, 2008
1 parent 6d5261b commit 26ca54dc8a79219349aa04e3cdc3a699e517fd0c
Showing with 17 additions and 0 deletions.
  1. +17 −0 src/core/symbology/qgsmarkercatalogue.cpp
@@ -50,6 +50,7 @@ QgsMarkerCatalogue::QgsMarkerCatalogue()
mList.append( "hard:cross2" );
mList.append( "hard:triangle" );
mList.append( "hard:star" );
mList.append( "hard:arrow" );

// SVG
QString svgPath = QgsApplication::svgPath();
@@ -289,5 +290,21 @@ void QgsMarkerCatalogue::hardMarker( QPainter * thepPainter, QString name, doubl
pa.setPoint( 9, x_c + oneSixth, y_c - oneSixth );
thepPainter->drawPolygon( pa );
}

else if (name == "arrow")
{
int oneEight = r / 4;
int quarter = r / 2;

QPolygon pa(7);
pa.setPoint( 0, x_c, y_c - r );
pa.setPoint( 1, x_c + quarter, y_c - quarter );
pa.setPoint( 2, x_c + oneEight, y_c - quarter );
pa.setPoint( 3, x_c + oneEight, y_c + r );
pa.setPoint( 4, x_c - oneEight, y_c + r );
pa.setPoint( 5, x_c - oneEight, y_c - quarter );
pa.setPoint( 6, x_c - quarter, y_c - quarter );
thepPainter->drawPolygon ( pa );
}
thepPainter->end();
}

0 comments on commit 26ca54d

Please sign in to comment.