[GRASS-SVN] r60096 - grass/trunk/display/d.legend
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon May 5 00:17:57 PDT 2014
Author: hamish
Date: 2014-05-05 00:17:57 -0700 (Mon, 05 May 2014)
New Revision: 60096
Modified:
grass/trunk/display/d.legend/main.c
Log:
trivial whitespace
Modified: grass/trunk/display/d.legend/main.c
===================================================================
--- grass/trunk/display/d.legend/main.c 2014-05-05 06:30:11 UTC (rev 60095)
+++ grass/trunk/display/d.legend/main.c 2014-05-05 07:17:57 UTC (rev 60096)
@@ -291,12 +291,12 @@
Rast_set_c_null_value(&null_cell, 1);
if (D_open_driver() != 0)
- G_fatal_error(_("No graphics device selected. "
+ G_fatal_error(_("No graphics device selected. "
"Use d.mon to select graphics device."));
-
+
white = D_translate_color(DEFAULT_FG_COLOR);
black = D_translate_color(DEFAULT_BG_COLOR);
-
+
if (opt_font->answer)
D_font(opt_font->answer);
else if (opt_path->answer)
@@ -657,6 +657,7 @@
1);
cstr = Rast_get_c_cat(&tcell, &cats);
+
if (!cstr[0]) /* no cats found, disable str output */
hide_catstr = 1;
else
@@ -685,7 +686,7 @@
}
}
- /* this probably shouldn't happen mid-loop as text sizes
+ /* this probably shouldn't happen mid-loop as text sizes
might not end up being uniform, but it's a start */
if (strlen(buff) > MaxLabelLen)
MaxLabelLen = strlen(buff);
@@ -725,21 +726,21 @@
D_pos_abs(x1 + 4, y0 + ppl * k + txsiz / 2);
}
else {
- /* text width is 0.81 of text height? so even though we set width
+ /* text width is 0.81 of text height? so even though we set width
to txsiz with D_text_size(), we still have to reduce.. hmmm */
if (!k) /* first */
D_pos_abs(x0 - (strlen(buff) * txsiz * .81 / 2),
- y1 + 4 + txsiz);
+ y1 + 4 + txsiz);
else if (k == steps - 1) /* last */
D_pos_abs(x1 - (strlen(buff) * txsiz * .81 / 2),
- y1 + 4 + txsiz);
+ y1 + 4 + txsiz);
else
D_pos_abs(x0 + ppl * k -
- (strlen(buff) * txsiz * .81 / 2),
- y1 + 4 + txsiz);
+ (strlen(buff) * txsiz * .81 / 2),
+ y1 + 4 + txsiz);
}
- if(color)
+ if (color)
D_text(buff);
} /*for */
@@ -926,11 +927,11 @@
}
else { /* is fp */
if (!flip) {
- if(use_catlist)
+ if (use_catlist)
/* pass through format exactly as given by the user in
the use= command line parameter (helps with log scale) */
sprintf(buff, "%s", opt_use->answers[i]);
- else
+ else
/* automatically generated/tuned decimal precision format */
sprintf(buff, DispFormat, catlist[i]);
}
@@ -944,7 +945,7 @@
D_pos_abs((l + 3 + dots_per_line), (cur_dot_row) - 3);
- if(color)
+ if (color)
D_text(buff);
}
@@ -971,13 +972,13 @@
}
D_use_color(white);
D_pos_abs((l + 3 + dots_per_line), (cur_dot_row));
- if(color)
+ if (color)
D_text(buff);
}
}
D_save_command(G_recreate_command());
D_close_driver();
-
+
exit(EXIT_SUCCESS);
}
More information about the grass-commit
mailing list