Skip to content

Commit

Permalink
Added hard:arrow marker
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9552 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
homann committed Oct 27, 2008
1 parent a42820e commit 641f23c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/core/symbology/qgsmarkercatalogue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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 641f23c

Please sign in to comment.