[GRASS5] d.legend updates
Glynn Clements
glynn.clements at virgin.net
Wed Dec 4 17:23:28 EST 2002
H. Bowman wrote:
> 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 patch doesn't apply to the current CVS head version, but it's
simple enough to make the changes manually.
> -The "set legend box according to mouse settings" fix is important,
> as the use-mouse option is totally unusable without.
I'll fix this.
> -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).
This appears to be erroneous; what was your reason for this change?
> -The dots_per_line-5 fix makes the output look much better.
I think that I see what you're trying to do, but I don't think that
the fix is quite right (all sides should be equal length). I've
applied the attached patch instead.
> **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?
Yes; I see that it's already been added (point #25). Although, it
would be worth stating that diffs should be made from the top-level
directory, e.g. "cvs diff src/display/d.leg.thin/main.c"; that way,
the diff will include the pathname rather than just "main.c".
--
Glynn Clements <glynn.clements at virgin.net>
-------------- next part --------------
Index: src/display/d.leg.thin/main.c
===================================================================
RCS file: /grassrepository/grass/src/display/d.leg.thin/main.c,v
retrieving revision 1.10
diff -u -r1.10 main.c
--- src/display/d.leg.thin/main.c 14 Aug 2002 09:07:22 -0000 1.10
+++ src/display/d.leg.thin/main.c 4 Dec 2002 22:16:56 -0000
@@ -438,12 +438,12 @@
x_box[0] = 0 ;
y_box[0] = 0 ;
x_box[1] = 0 ;
- y_box[1] = (6-dots_per_line) ;
- x_box[2] = (dots_per_line-6) ;
+ y_box[1] = (5-dots_per_line) ;
+ x_box[2] = (dots_per_line-5) ;
y_box[2] = 0 ;
x_box[3] = 0 ;
- y_box[3] = (dots_per_line-6) ;
- x_box[4] = (6-dots_per_line) ;
+ y_box[3] = (dots_per_line-5) ;
+ x_box[4] = (5-dots_per_line) ;
y_box[4] = 0 ;
@@ -475,7 +475,7 @@
/* Color solid box */
D_color((CELL)i,&colors) ;
- R_move_abs(l+4, (cur_dot_row-3)) ;
+ R_move_abs(l+4, (cur_dot_row-2)) ;
R_polygon_rel(x_box, y_box, 5) ;
/* Draw text */
More information about the grass-dev
mailing list