summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-08-02 18:06:28 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-08-02 18:06:28 +0200
commitf2e115a29f85d8d637f2e0894532212e93691118 (patch)
treec77d3674a5b38ad63d9becc067cee074d411bd56 /src
parent732e18ac89479a9a789068b32145825bb0c98ba4 (diff)
cleanup
Diffstat (limited to 'src')
-rw-r--r--src/OutputImage.H4
-rw-r--r--src/PreviewOutputImage.H1
-rw-r--r--src/PreviewOutputImage.cxx6
-rw-r--r--src/gipfel.cxx2
4 files changed, 6 insertions, 7 deletions
diff --git a/src/OutputImage.H b/src/OutputImage.H
index e7ab4e5..a7f01f5 100644
--- a/src/OutputImage.H
+++ b/src/OutputImage.H
@@ -23,7 +23,7 @@
class OutputImage {
private:
- int W, H, initialized, line;
+ int initialized;
public:
OutputImage();
@@ -39,6 +39,8 @@ class OutputImage {
int done();
protected:
+ int W, H, line;
+
virtual int init_internal(int w1, int h1);
virtual int set_pixel_internal(int x, char r, char g, char b);
diff --git a/src/PreviewOutputImage.H b/src/PreviewOutputImage.H
index 02e60c5..7095999 100644
--- a/src/PreviewOutputImage.H
+++ b/src/PreviewOutputImage.H
@@ -31,7 +31,6 @@ class PreviewOutputImage : OutputImage , public Fl_Widget {
private:
uchar *data;
int d;
- int row;
public:
PreviewOutputImage(int X, int Y, int W, int H);
diff --git a/src/PreviewOutputImage.cxx b/src/PreviewOutputImage.cxx
index ba86edc..078ba26 100644
--- a/src/PreviewOutputImage.cxx
+++ b/src/PreviewOutputImage.cxx
@@ -43,7 +43,6 @@ int
PreviewOutputImage::init_internal(int w, int h) {
data = (uchar*) malloc(w * h * d);
memset(data, 0, w * h * d);
- row = 0;
size(w, h);
return 0;
}
@@ -56,7 +55,7 @@ PreviewOutputImage::set_pixel_internal(int x, char r, char g, char b) {
return 1;
}
- long index = (row * w() * d + (x * d));
+ long index = (line * w() * d + (x * d));
*(data+index+0) = r;
*(data+index+1) = g;
*(data+index+2) = b;
@@ -66,8 +65,7 @@ PreviewOutputImage::set_pixel_internal(int x, char r, char g, char b) {
int
PreviewOutputImage::next_line_internal() {
- row++;
- if (row % (h() / 100) == 0) {
+ if (line % 10 == 0) {
redraw();
Fl::check();
}
diff --git a/src/gipfel.cxx b/src/gipfel.cxx
index 5dd69a7..8256cd8 100644
--- a/src/gipfel.cxx
+++ b/src/gipfel.cxx
@@ -450,7 +450,7 @@ static int stitch(int stitch_w, int stitch_h, int argc, char **argv) {
st->load_image(argv[i]);
}
- win = new Fl_Window(0,0, 1000, stitch_h);
+ win = new Fl_Window(0,0, stitch_w, stitch_h);
scroll = new Fl_Scroll(0, 0, win->w(), win->h());
PreviewOutputImage *img = new PreviewOutputImage(0, 0, stitch_w, stitch_h);
win->resizable(scroll);