diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-09-01 22:02:28 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-09-01 22:02:28 +0200 |
commit | 1eeb793701bc01670d22454f81ad5312bf8fa013 (patch) | |
tree | 99c0f82436aeb4158ac05ffc153fca2de7fd4a85 /dw/fltkviewbase.cc | |
parent | 652a25919942438b6145dc9db672ad6c6b477306 (diff) |
further reduce size of rectangles before drawing
Make currently exposed area available in FltkViewBase and use it to
clip rectangles to the required size before drawing them.
We can use the same mechanism to limit drawImage() calls instead of
doing it in dw/image.cc as currently done.
Diffstat (limited to 'dw/fltkviewbase.cc')
-rw-r--r-- | dw/fltkviewbase.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dw/fltkviewbase.cc b/dw/fltkviewbase.cc index 1d82a661..89253179 100644 --- a/dw/fltkviewbase.cc +++ b/dw/fltkviewbase.cc @@ -48,6 +48,7 @@ FltkViewBase::FltkViewBase (int x, int y, int w, int h, const char *label): canvasHeight = 1; bgColor = WHITE; mouse_x = mouse_y = 0; + exposeArea = NULL; if (backBuffer == NULL) { backBuffer = new Image (); } @@ -129,6 +130,8 @@ void FltkViewBase::draw (const core::Rectangle *rect, viewRect.w (), viewRect.h ()); + exposeArea = &viewRect; + if (type == DRAW_BUFFERED && backBuffer && !backBufferInUse) { backBufferInUse = true; { @@ -160,6 +163,8 @@ void FltkViewBase::draw (const core::Rectangle *rect, fillrect (viewRect); theLayout->expose (this, &r); } + + exposeArea = NULL; } } |