diff options
author | corvid <corvid@lavabit.com> | 2011-01-12 22:14:12 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2011-01-12 22:14:12 +0000 |
commit | 497f75a577470f2d211e2192e951c7c084e41115 (patch) | |
tree | a9dfc0c531f0561c59b11a854cd9c966aadf24df | |
parent | c3fdae648e12378d8a0b5191253e43a6630b7741 (diff) |
fltkimgbuf
-rw-r--r-- | dw/fltkimgbuf.cc | 14 | ||||
-rw-r--r-- | dw/fltkimgbuf.hh | 2 |
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); }; |