summaryrefslogtreecommitdiff
path: root/src/Stitch.cxx
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-06-25 19:31:08 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-06-25 19:31:08 +0200
commit5e188fda3b5d539b299a7c7ce63f98264fa8c229 (patch)
treed6ce5d539aff66555a9166b74173d57ceaede8b0 /src/Stitch.cxx
parent88555db930fc170f97ebbca6c17802392a5b5f25 (diff)
adjust parameters
Diffstat (limited to 'src/Stitch.cxx')
-rw-r--r--src/Stitch.cxx21
1 files changed, 14 insertions, 7 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; i<MAX_PICS; i++) {
if (gipf[i] == NULL) {
gipf[i] = new GipfelWidget(0, 0, 800, 600);
- gipf[i]->load_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; x<img->w(); x++) {
- for (int y=0; y<img->h(); y++) {
- double a_view, a_nick;
+ for (int y=0; y<img->h(); y++) {
+ double a_nick = atan(((double)(y_off - y)/(double)img->h()));
+
+ for (int x=0; x<img->w(); x++) {
+ double a_view;
a_view = view_start + x * step_view;
- a_nick = (y_off - y) * step_view;
for (int i=0; i<MAX_PICS; i++) {
if (gipf[i] == NULL) {
@@ -80,7 +84,10 @@ Stitch::resample(DataImage *img,
}
}
}
- img->redraw();
- Fl::check();
+
+ if (y % (img->h() / 200) == 0) {
+ img->redraw();
+ Fl::check();
+ }
}
}