summaryrefslogtreecommitdiff
path: root/src/ScanImage.H
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-05-20 09:49:16 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-05-20 09:49:16 +0200
commitdf5384ff38ee2c62cf9f038a7d4b8c5b6e7e62b2 (patch)
tree1f0e987e64abf31b74800dc1113abcc21c043b47 /src/ScanImage.H
parentb669f825944b8f487e9cadd15dff59fcfad6cfe5 (diff)
factor out ScanImage class
Diffstat (limited to 'src/ScanImage.H')
-rw-r--r--src/ScanImage.H31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/ScanImage.H b/src/ScanImage.H
new file mode 100644
index 0000000..e318273
--- /dev/null
+++ b/src/ScanImage.H
@@ -0,0 +1,31 @@
+//
+// Copyright 2006 Johannes Hofmann <Johannes.Hofmann@gmx.de>
+//
+// This software may be used and distributed according to the terms
+// of the GNU General Public License, incorporated herein by reference.
+
+#ifndef ScanImage_H
+#define ScanImage_H
+
+#include <FL/Fl_Image.H>
+
+class ScanImage {
+ private:
+ static int get_pixel_nearest(Fl_Image *img, double x, double y,
+ int *r, int *g, int *b);
+ static int get_pixel_bicubic(Fl_Image *img, double x, double y,
+ int *r, int *g, int *b);
+ static int get_pixel(Fl_Image *img, int x, int y,
+ int *r, int *g, int *b);
+
+ public:
+ typedef enum {
+ NEAREST = 0,
+ BICUBIC = 1
+ } mode_t;
+
+ static int get_pixel(Fl_Image *img, mode_t mode,
+ double x, double y, int *r, int *g, int *b);
+};
+
+#endif