diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/gipfel.cxx | 20 | 
1 files changed, 13 insertions, 7 deletions
diff --git a/src/gipfel.cxx b/src/gipfel.cxx index d2850d7..3a68ec3 100644 --- a/src/gipfel.cxx +++ b/src/gipfel.cxx @@ -62,7 +62,7 @@ Fl_Value_Input *i_view_lat, *i_view_long, *i_view_height;  Fl_Box *b_viewpoint;  Fl_Menu_Bar *mb; -int stitch(int argc, char **argv); +int stitch(int stitch_w, int stitch_h, int argc, char **argv);  void set_values() {    s_center->value(gipf->get_center_angle()); @@ -323,13 +323,13 @@ int main(int argc, char** argv) {    char c, *sep, *tmp, **my_argv;    char *view_point = NULL;    int err, bflag = 0, dflag = 0, my_argc; -  int stitch_flag = 0; +  int stitch_flag = 0, stitch_w = 2000, stitch_h = 500;    Fl_Window *control_win, *view_win;    Fl_Scroll *scroll;    err = 0; -  while ((c = getopt(argc, argv, "d:v:s")) != EOF) { +  while ((c = getopt(argc, argv, "d:v:sw:b:")) != EOF) {      switch (c) {        case 'h':        usage(); @@ -344,6 +344,12 @@ int main(int argc, char** argv) {      case 's':        stitch_flag++;        break; +    case 'w': +      stitch_w = atoi(optarg); +      break; +    case 'b': +      stitch_h = atoi(optarg); +      break;      default:        err++;      } @@ -363,7 +369,7 @@ int main(int argc, char** argv) {    }    if (stitch_flag) { -    stitch(my_argc, my_argv); +    stitch(stitch_w, stitch_h, my_argc, my_argv);    }    Fl::get_system_colors(); @@ -411,7 +417,7 @@ int main(int argc, char** argv) {    return Fl::run();  } -int stitch(int argc, char **argv) { +int stitch(int stitch_w, int stitch_h, int argc, char **argv) {    Fl_Window *win;    Fl_Scroll *scroll;    Stitch *st = new Stitch(); @@ -428,9 +434,9 @@ int stitch(int argc, char **argv) {    st->load_image("test10.jpg");    st->load_image("test11.jpg"); -  win = new Fl_Window(0,0, 1000, 1000); +  win = new Fl_Window(0,0, 1000, stitch_h);    scroll = new Fl_Scroll(0, 0, win->w(), win->h()); -  DataImage *img = new DataImage(0, 0, 10000, 2000); +  DataImage *img = new DataImage(0, 0, stitch_w, stitch_h);    win->resizable(scroll);    win->show(0, argv);   | 
