|
@@ -12,7 +12,7 @@
|
|
|
* Hamish Bowman <hamish_b yahoo.com>,
|
|
|
* Jan-Oliver Wagner <jan intevation.de>
|
|
|
* PURPOSE: displays a barscale on graphics monitor
|
|
|
- * COPYRIGHT: (C) 1999-2007 by the GRASS Development Team
|
|
|
+ * COPYRIGHT: (C) 1999-2011 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
|
|
@@ -41,9 +41,10 @@ int draw = 0;
|
|
|
int main(int argc, char **argv)
|
|
|
{
|
|
|
struct GModule *module;
|
|
|
- struct Option *opt1, *opt2, *opt3;
|
|
|
+ struct Option *opt1, *opt2, *opt3, *fsize;
|
|
|
struct Flag *feet, *top, *linescale, *northarrow, *scalebar;
|
|
|
struct Cell_head W;
|
|
|
+ int fontsize;
|
|
|
|
|
|
/* Initialize the GIS calls */
|
|
|
G_gisinit(argv[0]);
|
|
@@ -90,6 +91,14 @@ int main(int argc, char **argv)
|
|
|
opt3->description =
|
|
|
_("The screen coordinates for top-left corner of label ([0,0] is top-left of frame)");
|
|
|
|
|
|
+ fsize = G_define_option();
|
|
|
+ fsize->key = "fontsize";
|
|
|
+ fsize->type = TYPE_INTEGER;
|
|
|
+ fsize->required = NO;
|
|
|
+ fsize->answer = "14";
|
|
|
+ fsize->options = "1-72";
|
|
|
+ fsize->description = _("Font size for gridline coordinate labels");
|
|
|
+
|
|
|
if (G_parser(argc, argv))
|
|
|
exit(EXIT_FAILURE);
|
|
|
|
|
@@ -113,7 +122,7 @@ int main(int argc, char **argv)
|
|
|
|
|
|
sscanf(opt3->answers[0], "%lf", &east);
|
|
|
sscanf(opt3->answers[1], "%lf", &north);
|
|
|
-
|
|
|
+ fontsize = atoi(fsize->answer);
|
|
|
|
|
|
if (D_open_driver() != 0)
|
|
|
G_fatal_error(_("No graphics device selected"));
|
|
@@ -129,7 +138,7 @@ int main(int argc, char **argv)
|
|
|
color2 = D_parse_color(opt2->answer, 0);
|
|
|
|
|
|
/* Draw the scale */
|
|
|
- draw_scale(top->answer);
|
|
|
+ draw_scale(top->answer, fontsize);
|
|
|
|
|
|
D_close_driver();
|
|
|
|