Added arrowheads (filled and unfilled) to simple markers

git-svn-id: http://svn.osgeo.org/qgis/trunk@14837 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
wonder 2010-12-04 15:46:28 +00:00
parent f99179eeed
commit 0dacde970a
2 changed files with 14 additions and 1 deletions

View File

@ -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;
}
@ -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;
}

View File

@ -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 )
{