From 5e188fda3b5d539b299a7c7ce63f98264fa8c229 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Sun, 25 Jun 2006 19:31:08 +0200 Subject: adjust parameters --- src/Stitch.cxx | 21 ++++++++++++++------- src/gipfel.cxx | 20 ++++++++++++++------ 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/src/Stitch.cxx b/src/Stitch.cxx index 21b0ba7..ae3158d 100644 --- a/src/Stitch.cxx +++ b/src/Stitch.cxx @@ -50,7 +50,10 @@ Stitch::load_image(char *file) { for (int i=0; iload_image(file); + if (gipf[i]->load_image(file) != 0) { + delete gipf[i]; + gipf[i] = NULL; + } break; } } @@ -65,11 +68,12 @@ Stitch::resample(DataImage *img, char r, g, b; int y_off = img->h() / 2; - for (int x=0; xw(); x++) { - for (int y=0; yh(); y++) { - double a_view, a_nick; + for (int y=0; yh(); y++) { + double a_nick = atan(((double)(y_off - y)/(double)img->h())); + + for (int x=0; xw(); x++) { + double a_view; a_view = view_start + x * step_view; - a_nick = (y_off - y) * step_view; for (int i=0; iredraw(); - Fl::check(); + + if (y % (img->h() / 200) == 0) { + img->redraw(); + Fl::check(); + } } } diff --git a/src/gipfel.cxx b/src/gipfel.cxx index 19c21cb..d2850d7 100644 --- a/src/gipfel.cxx +++ b/src/gipfel.cxx @@ -362,6 +362,10 @@ int main(int argc, char** argv) { exit(1); } + if (stitch_flag) { + stitch(my_argc, my_argv); + } + Fl::get_system_colors(); if (getenv("FLTK_SCHEME")) { Fl::scheme(NULL); @@ -369,10 +373,6 @@ int main(int argc, char** argv) { Fl::scheme("plastic"); } - if (stitch_flag) { - stitch(my_argc, my_argv); - } - control_win = create_control_window(); view_win = new Fl_Window(800, 600); @@ -420,13 +420,21 @@ int stitch(int argc, char **argv) { st->load_image("test2.jpg"); st->load_image("test3.jpg"); st->load_image("test4.jpg"); + st->load_image("test5.jpg"); + st->load_image("test6.jpg"); + st->load_image("test7.jpg"); + st->load_image("test8.jpg"); + st->load_image("test9.jpg"); + st->load_image("test10.jpg"); + st->load_image("test11.jpg"); win = new Fl_Window(0,0, 1000, 1000); scroll = new Fl_Scroll(0, 0, win->w(), win->h()); - DataImage *img = new DataImage(0, 0, 2000, 500); + DataImage *img = new DataImage(0, 0, 10000, 2000); + win->resizable(scroll); win->show(0, argv); - st->resample(img, 0.0, 6.3); + st->resample(img, 0.0, 7.0); Fl::run(); exit(0); } -- cgit v1.2.3