diff options
Diffstat (limited to 'dw/fltkviewbase.hh')
-rw-r--r-- | dw/fltkviewbase.hh | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/dw/fltkviewbase.hh b/dw/fltkviewbase.hh index c502d2f7..fb3f2fe1 100644 --- a/dw/fltkviewbase.hh +++ b/dw/fltkviewbase.hh @@ -20,20 +20,23 @@ private: int bgColor; core::Region drawRegion; + ::fltk::Rectangle *exposeArea; static ::fltk::Image *backBuffer; static bool backBufferInUse; void draw (const core::Rectangle *rect, DrawType type); void drawChildWidgets (); inline void clipPoint (int *x, int *y) { - if (*x < 0) - *x = 0; - if (*x > w ()) - *x = w (); - if (*y < 0) - *y = 0; - if (*y > h ()) - *y = h (); + if (exposeArea) { + if (*x < exposeArea->x ()) + *x = exposeArea->x (); + if (*x > exposeArea->r ()) + *x = exposeArea->r (); + if (*y < exposeArea->y ()) + *y = exposeArea->y (); + if (*y > exposeArea->b ()) + *y = exposeArea->b (); + } } protected: |