[GRASS5] d.legend updates
H. Bowman
ihatejunkyabastards at yahoo.com
Wed Dec 4 00:42:57 EST 2002
Hamish:
> > > > > the new d.legend now in CVS
> > > I based my version on what was in the Grass 5.0.0 release.. and so
Markus:
> I was 100% sure that Hamish is working on the CVS HEAD (why not?).
Sorry about all the confusion folks, thought I'd checked to see they were the same before I started. Guess not. My apologies.
Markus:
> I have reverted the release_branch sync but left the HEAD
> untouched for now.
attached pls find a short diff that fixes three bugs in the 5.0.0 release version. (The diff is against the 5.0.0 source, which I think is now the same as what's in the 5.0 CVS, aside from the versioning and header comments.)
-The "set legend box according to mouse settings" fix is important, as the use-mouse option is totally unusable without.
-The G_fatal_error -> exit(-1) was the only bug fix I missed verus the CVS version. (The only other changes were Markus's -o and maxfontsize= enhancements, which I would have changed anyway, luckily).
-The dots_per_line-5 fix makes the output look much better.
**Header comments are now out of sync with the code (11/2002..)
Once 5.0.1 is done, I'll send out my latest and greatest for testing (not finished yet).
Glynn:
> Either unified ("diff -u") or context ("diff -c") format. "Plain"
> diffs (the default format) are risky, because they will apply without
> warning to code which has been substantially changed; they are also
> harder to read than unified or context diffs.
Thanks for the tip. Should this be added to the SUBMITTING file?
Glynn:
> If there are definite bugs with simple fixes, they should be
> considered separately from non-trivial improvements.
see above/below.
regards,
Hamish
-------------- next part --------------
--- main.c.5.0.0 2002-11-13 03:20:11.000000000 +1300
+++ main.c.5.0.0plus 2002-12-04 16:36:05.000000000 +1300
@@ -147,7 +147,10 @@
{
new_colr = D_translate_color(opt2->answer) ;
if (new_colr == 0)
- G_fatal_error ("Don't know the color %s", opt2->answer) ;
+ {
+ fprintf (stdout,"Don't know the color %s\n", opt2->answer) ;
+ exit(-1);
+ }
color = new_colr ;
}
@@ -374,11 +377,11 @@
{
int lleg, dx, dy, horiz, txsiz;
- /* set legend box according to nouse settings */
- t=x0;
- l=y0;
- b=x1;
- r=y1;
+ /* set legend box according to mouse settings */
+ t=y0;
+ l=x0;
+ b=y1;
+ r=x1;
horiz = (x1-x0 > y1-y0);
if(horiz){
@@ -406,10 +409,10 @@
y_box[0] = 0 ;
x_box[1] = 0 ;
y_box[1] = (6-dots_per_line) ;
- x_box[2] = (dots_per_line-6) ;
+ x_box[2] = (dots_per_line-5) ;
y_box[2] = 0 ;
x_box[3] = 0 ;
- y_box[3] = (dots_per_line-6) ;
+ y_box[3] = (dots_per_line-5) ;
x_box[4] = (6-dots_per_line) ;
y_box[4] = 0 ;
More information about the grass-dev
mailing list