[GRASS5] [bug #2786] (grass) d.zoomed in and out too much, now can't get back exactly
Florian Goessmann
florian at wallweg39.de
Thu Dec 9 11:53:51 EST 2004
alright, that was easy. i guess i'm supposed to send the files to this
list.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dm.diffs
Type: application/octet-stream
Size: 1235 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20041209/285d4633/dm.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zoom_back.gif
Type: image/gif
Size: 104 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20041209/285d4633/zoom_back.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dzoom.diffs
Type: application/octet-stream
Size: 2379 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20041209/285d4633/dzoom.obj
-------------- next part --------------
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "gis.h"
#include "display.h"
#include "raster.h"
#include "local_proto.h"
#include "glocale.h"
int quit (struct Cell_head *defwin, struct Cell_head *currwin) {
int screen_x, screen_y, button;
int hand = 0;
double ux1, uy1, ux2, uy2, ew, ns;
fprintf(stderr, "\n\nButtons:\n") ;
fprintf(stderr, "%s reset to default region\n", lefts) ;
fprintf(stderr, "%s reset to region before d.zoom started\n", middles) ;
fprintf(stderr, "%s Quit\n", rights) ;
R_get_location_with_pointer(&screen_x, &screen_y, &button);
if (button == leftb) {
ew = defwin->east - defwin->west;
ns = defwin->north - defwin->south;
if ( ns <= defwin->ns_res ) {
ns = 2 * defwin->ns_res;
}
if ( ew <= defwin->ew_res ) {
ew = 2 * defwin->ew_res;
}
ux1 = defwin->east;
ux2 = defwin->west;
uy1 = defwin->north;
uy2 = defwin->south;
set_win (defwin, ux1, uy1, ux2, uy2, hand);
return 0;
}
if (button == middleb) {
ew = currwin->east - currwin->west;
ns = currwin->north - currwin->south;
if ( ns <= currwin->ns_res ) {
ns = 2 * currwin->ns_res;
}
if ( ew <= currwin->ew_res ) {
ew = 2 * currwin->ew_res;
}
ux1 = currwin->east;
ux2 = currwin->west;
uy1 = currwin->north;
uy2 = currwin->south;
set_win (currwin, ux1, uy1, ux2, uy2, hand);
return 0;
}
if (button == rightb) {
return 0;
}
}
-------------- next part --------------
so here they are. the two diff files, for d.m and d.zoom as well as the
two new files needed. the new button for the gis manager and the quit
function for d.zoom.
regards
florian
On 09 Dec 2004, at 14:02, Markus Neteler wrote:
> Florian,
>
> making diffs is quite simple and does not require cvs write access.
> The few steps are (nothing to program):
>
> - have a fresh 5.7 source code tree (needed anyway);
> run
> cvs up -dP
> to refresh again (works fine even over 56k modem)
> - create the diffs:
> cd display/d.zoom/
> cvs diff -u > dzoom.diffs
>
> - send/post the file (as attachment).
>
> That's it!
>
> Thanks
>
> Markus
More information about the grass-dev
mailing list