[GRASS-SVN] r45811 - grass/trunk/display/d.grid
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Mar 30 01:25:03 EDT 2011
Author: hamish
Date: 2011-03-29 22:25:03 -0700 (Tue, 29 Mar 2011)
New Revision: 45811
Modified:
grass/trunk/display/d.grid/plot.c
Log:
placeholder code for geogrid marks (merge from devbr6)
Modified: grass/trunk/display/d.grid/plot.c
===================================================================
--- grass/trunk/display/d.grid/plot.c 2011-03-30 05:22:09 UTC (rev 45810)
+++ grass/trunk/display/d.grid/plot.c 2011-03-30 05:25:03 UTC (rev 45811)
@@ -211,7 +211,10 @@
if (line_width)
D_line_width(line_width);
- D_line_abs(e1, n1, e2, n2);
+
+ if (mark_type == MARK_GRID)
+ D_line_abs(e1, n1, e2, n2);
+
D_line_width(0);
}
@@ -267,7 +270,10 @@
if (line_width)
D_line_width(line_width);
- D_line_abs(e1, n1, e2, n2);
+
+ if (mark_type == MARK_GRID)
+ D_line_abs(e1, n1, e2, n2);
+
D_line_width(0);
}
if (do_text) {
@@ -285,6 +291,31 @@
D_text_rotation(0.0); /* reset */
+ /* draw marks not grid lines */
+ if (mark_type != MARK_GRID) {
+ G_warning("Geogrid marks not yet implemented");
+#ifdef TODO
+ e1 = combine above;
+ n1 = combine above;
+
+ /* plot marks */
+ while (e1 <= window.east) {
+ n1 = y0; /* reset */
+ while (n1 <= window.north) {
+ if (mark_type == MARK_CROSS)
+ plot_cross(e1, n1, gcolor, 0.0);
+ else if (mark_type == MARK_FIDUCIAL)
+ plot_fiducial(e1, n1, gcolor, 0.0);
+ else if (mark_type == MARK_DOT)
+ plot_dot(e1, n1, gcolor);
+ n1 += grid_size;
+ }
+ e1 += grid_size;
+ }
+#endif
+ /* also TODO: rotate cross and fiducial marks by the converge angle; see g.region -n */
+ }
+
return 0;
}
More information about the grass-commit
mailing list