diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-07-28 20:28:32 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-07-28 20:28:32 +0200 |
commit | a9997394eb77e5742021f0b03708196b2e5364bd (patch) | |
tree | 239bf38610a1a7ea6c2f44068fea3ac14bdbf47b /dw/fltkviewbase.hh | |
parent | e47158fd9023eec4dd5e852f33f327901a5a6632 (diff) |
properly clip draw requests
We always need to set a clipping rectangle when drawing to
avoid that text "leaks" out as in the following
test case (by corvid):
<input type="image" name="name1" src="whatever"
WIDTH="80" HEIGHT="14"
alt="name1name1name1name1">
<input type="image" name="name2" src="whatever"
width="9" height="14"
alt="name2name2name2name2">
Diffstat (limited to 'dw/fltkviewbase.hh')
-rw-r--r-- | dw/fltkviewbase.hh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dw/fltkviewbase.hh b/dw/fltkviewbase.hh index 3bdb1666..4dc0a27f 100644 --- a/dw/fltkviewbase.hh +++ b/dw/fltkviewbase.hh @@ -16,12 +16,14 @@ namespace fltk { class FltkViewBase: public FltkView, public ::fltk::Group { private: + typedef enum { DRAW_PLAIN, DRAW_CLIPPED, DRAW_BUFFERED } DrawType; + int bgColor; core::Region drawRegion; static ::fltk::Image *backBuffer; static bool backBufferInUse; - void draw (const core::Rectangle *rect, bool doubleBuffer); + void draw (const core::Rectangle *rect, DrawType type); void drawChildWidgets (); protected: |