summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorLauri Kasanen <cand@gmx.com>2014-09-03 11:00:56 +0000
committerLauri Kasanen <cand@gmx.com>2014-09-03 11:00:56 +0000
commitcce4cece01b755dace58e20840a2bc9ec9593b9f (patch)
tree8ff77369abb94246513aa9642a475b20170aa0f7 /FL
parent105c2b466a020dda40f8a9dec189c5fe9fd4fa3e (diff)
Add bilinear scaling support. STRs #2869 and #3062.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10268 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Image.H17
1 files changed, 17 insertions, 0 deletions
diff --git a/FL/Fl_Image.H b/FL/Fl_Image.H
index edba4fe29..7a1f4fdbc 100644
--- a/FL/Fl_Image.H
+++ b/FL/Fl_Image.H
@@ -154,6 +154,14 @@ class FL_EXPORT Fl_Image {
virtual void uncache();
};
+/// \enum Fl_RGB_Scaling
+/// The scaling algorithm to use.
+///
+enum Fl_RGB_Scaling {
+ FL_SCALING_NEAREST = 0,
+ FL_SCALING_BILINEAR
+};
+
/**
The Fl_RGB_Image class supports caching and drawing
of full-color images with 1 to 4 channels of color information.
@@ -170,6 +178,7 @@ class FL_EXPORT Fl_RGB_Image : public Fl_Image {
friend class Fl_GDI_Graphics_Driver;
friend class Fl_Xlib_Graphics_Driver;
static size_t max_size_;
+ static Fl_RGB_Scaling scaling_;
public:
const uchar *array;
@@ -230,6 +239,14 @@ public:
\sa void Fl_RGB_Image::max_size(size_t)
*/
static size_t max_size() {return max_size_;}
+
+ /** Sets the currently used scaling method.
+ Applies to all RGB images, defaults to FL_SCALING_NEAREST.
+ */
+ static void scaling(Fl_RGB_Scaling);
+
+ /** Returns the currently used scaling method. */
+ static Fl_RGB_Scaling scaling();
};
#endif // !Fl_Image_H