summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-06-26 17:24:20 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-06-26 17:24:20 +0200
commit76daa38e38aff35613dcaf18330192833fd83deb (patch)
treeb28de512bf6710e61a234d4868b09c8364075fe1 /src
parent98c1c1890e91962876e53c026f5f3c502562d8b0 (diff)
add -w and -h switch
Diffstat (limited to 'src')
-rw-r--r--src/gipfel.cxx20
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);