diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2011-02-11 22:55:45 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2011-02-11 22:55:45 +0100 |
commit | ea3111c826c7892fd6fa3c2c15999e7500d381b2 (patch) | |
tree | b84d9bd20ac4d44044d800ffcf21621cccb5a737 /dw/fltkviewbase.hh | |
parent | a11a2e0366866db9409760d312eda22a5bf0a690 (diff) |
port buffered drawing
Diffstat (limited to 'dw/fltkviewbase.hh')
-rw-r--r-- | dw/fltkviewbase.hh | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/dw/fltkviewbase.hh b/dw/fltkviewbase.hh index d741397f..0d09a6a6 100644 --- a/dw/fltkviewbase.hh +++ b/dw/fltkviewbase.hh @@ -5,7 +5,7 @@ #include <sys/time.h> // for time_t in FreeBSD #include <FL/Fl_Group.H> -#include <FL/Fl_Image.H> +#include <FL/x.H> #include <FL/Fl_Scrollbar.H> #include "fltkcore.hh" @@ -16,12 +16,26 @@ namespace fltk { class FltkViewBase: public FltkView, public Fl_Group { private: + class BackBuffer { + private: + int w; + int h; + bool created; + + public: + Fl_Offscreen offscreen; + + BackBuffer (); + ~BackBuffer (); + void setSize(int w, int h); + }; + typedef enum { DRAW_PLAIN, DRAW_CLIPPED, DRAW_BUFFERED } DrawType; int bgColor; core::Region drawRegion; //::fltk::Rectangle *exposeArea; - static Fl_Image *backBuffer; + static BackBuffer *backBuffer; static bool backBufferInUse; void draw (const core::Rectangle *rect, DrawType type); |