aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dw/fltkimgbuf.cc14
-rw-r--r--dw/fltkimgbuf.hh2
2 files changed, 6 insertions, 10 deletions
diff --git a/dw/fltkimgbuf.cc b/dw/fltkimgbuf.cc
index 6ba7ff1d..8724a935 100644
--- a/dw/fltkimgbuf.cc
+++ b/dw/fltkimgbuf.cc
@@ -23,13 +23,10 @@
#include "../lout/msg.h"
#include "../lout/misc.hh"
-#include <fltk/draw.h>
-#include <fltk/Color.h>
+#include <FL/fl_draw.H>
#define IMAGE_MAX_AREA (6000 * 6000)
-using namespace fltk;
-
namespace dw {
namespace fltk {
@@ -302,7 +299,7 @@ int FltkImgbuf::scaledY(int ySrc)
return ySrc * height / root->height;
}
-void FltkImgbuf::draw (::fltk::Widget *target, int xRoot, int yRoot,
+void FltkImgbuf::draw (Fl_Widget *target, int xRoot, int yRoot,
int x, int y, int width, int height)
{
// TODO: Clarify the question, whether "target" is the current widget
@@ -324,10 +321,9 @@ void FltkImgbuf::draw (::fltk::Widget *target, int xRoot, int yRoot,
height = this->height - y;
}
- // Draw
- ::fltk::Rectangle rect (xRoot + x, yRoot + y, width, height);
- PixelType ptype = (type == RGBA) ? ::fltk::RGBA : ::fltk::RGB;
- drawimage(rawdata+bpp*(y*this->width + x),ptype,rect,bpp*this->width);
+ fl_draw_image(rawdata+bpp*(y*this->width + x), xRoot + x, yRoot + y, width,
+ height, bpp);
+
}
} // namespace dw
diff --git a/dw/fltkimgbuf.hh b/dw/fltkimgbuf.hh
index 54d9ca34..30e0cc37 100644
--- a/dw/fltkimgbuf.hh
+++ b/dw/fltkimgbuf.hh
@@ -55,7 +55,7 @@ public:
void setDeleteOnUnref (bool deleteOnUnref);
bool isReferred ();
- void draw (::fltk::Widget *target, int xRoot, int yRoot,
+ void draw (Fl_Widget *target, int xRoot, int yRoot,
int x, int y, int width, int height);
};