|
@@ -1,23 +1,21 @@
|
|
|
-
|
|
|
-/**
|
|
|
- * \file icon.c
|
|
|
- *
|
|
|
- * \brief GIS Library - Plot icon
|
|
|
- *
|
|
|
- * (C) 2001-2008 by the GRASS Development Team
|
|
|
- *
|
|
|
- * This program is free software under the GNU General Public License
|
|
|
- * (>=v2). Read the file COPYING that comes with GRASS for details.
|
|
|
- *
|
|
|
- * \author GRASS GIS Development Team
|
|
|
- *
|
|
|
- * \date 1999-2008
|
|
|
- */
|
|
|
+/*!
|
|
|
+ \file lib/display/icon.c
|
|
|
+
|
|
|
+ \brief Display Library - Plot icon
|
|
|
+
|
|
|
+ (C) 2001-2008, 2012 by the GRASS Development Team
|
|
|
+
|
|
|
+ This program is free software under the GNU General Public License
|
|
|
+ (>=v2). Read the file COPYING that comes with GRASS for details.
|
|
|
+
|
|
|
+ \author USA-CERL
|
|
|
+*/
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
#include <math.h>
|
|
|
#include <grass/gis.h>
|
|
|
#include <grass/display.h>
|
|
|
+#include <grass/glocale.h>
|
|
|
|
|
|
static void line(double m[2][3], double x0, double y0, double x1, double y1)
|
|
|
{
|
|
@@ -29,15 +27,18 @@ static void line(double m[2][3], double x0, double y0, double x1, double y1)
|
|
|
D_line_abs(tx0, ty0, tx1, ty1);
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * \brief Plot icon
|
|
|
- *
|
|
|
- * \param[in] xc,yc icon coordinates
|
|
|
- * \param[in] type icon type
|
|
|
- * \param[in] angle rotation angle [rad]
|
|
|
- * \param[in] scale scale factor
|
|
|
- *
|
|
|
- * \return 1
|
|
|
+/*!
|
|
|
+ \brief Plot icon
|
|
|
+
|
|
|
+ Supported types:
|
|
|
+ - G_ICON_CROSS
|
|
|
+ - G_ICON_BOX
|
|
|
+ - G_ICON_ARROW
|
|
|
+
|
|
|
+ \param xc,yc icon coordinates
|
|
|
+ \param type icon type
|
|
|
+ \param angle rotation angle [rad]
|
|
|
+ \param scale scale factor
|
|
|
*/
|
|
|
void D_plot_icon(double xc, double yc, int type, double angle, double scale)
|
|
|
{
|
|
@@ -75,5 +76,8 @@ void D_plot_icon(double xc, double yc, int type, double angle, double scale)
|
|
|
line(m, -1, 0.5, 0, 0.0);
|
|
|
line(m, -1, -0.5, 0, 0.0);
|
|
|
break;
|
|
|
+ default:
|
|
|
+ G_warning(_("Unsupported icon %d"), type);
|
|
|
+ break;
|
|
|
}
|
|
|
}
|