changeset 1827:381e20f15250

fltkimgbuf
author corvid <corvid@lavabit.com>
date Wed, 12 Jan 2011 22:14:12 +0000
parents cc9a1b620d34
children 314d5caca56d
files dw/fltkimgbuf.cc dw/fltkimgbuf.hh
diffstat 2 files changed, 6 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/dw/fltkimgbuf.cc	Wed Jan 12 03:26:52 2011 +0000
+++ b/dw/fltkimgbuf.cc	Wed Jan 12 22:14:12 2011 +0000
@@ -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 @@
    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 @@
       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
--- a/dw/fltkimgbuf.hh	Wed Jan 12 03:26:52 2011 +0000
+++ b/dw/fltkimgbuf.hh	Wed Jan 12 22:14:12 2011 +0000
@@ -55,7 +55,7 @@
    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);
 };