[QGIS Commit] r9552 - trunk/qgis/src/core/symbology
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Mon Oct 27 16:28:02 EDT 2008
Author: homann
Date: 2008-10-27 16:28:02 -0400 (Mon, 27 Oct 2008)
New Revision: 9552
Modified:
trunk/qgis/src/core/symbology/qgsmarkercatalogue.cpp
Log:
Added hard:arrow marker
Modified: trunk/qgis/src/core/symbology/qgsmarkercatalogue.cpp
===================================================================
--- trunk/qgis/src/core/symbology/qgsmarkercatalogue.cpp 2008-10-27 17:35:28 UTC (rev 9551)
+++ trunk/qgis/src/core/symbology/qgsmarkercatalogue.cpp 2008-10-27 20:28:02 UTC (rev 9552)
@@ -50,6 +50,7 @@
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 @@
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();
}
More information about the QGIS-commit
mailing list