[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

extending scrolling-window to include copy-bits or scroll-region

My application does some rather time-consuming line drawing to a view.
When the view is later scrolled or exposed, its view-draw-contents
method is called, and all of the drawing takes place all over again,
taking just as much time as it did the first time.

It seems that the solution would be to 
  - draw to both the view and an off-screen bitmap
  - copy the bitmap to the view, at the appropriate offsets, in the
    view-draw-contents method.

This must be a common need.  I've checked through the examples folder,
and the cambridge ftp site.  If there's anything there, I missed it.

The scrolling-windows class (MCL2.0:examples:scrolling-windows.lisp)
is a good start.  Has someone already extended this, or the scroller
class, so that view-draw-contents can refer to an off-screen bitmap
when appropriate?

If there isn't such a general purpose class already, do you have
any suggestions on how I should approach it?


 - Paul Shannon
   National Radio Astronomy Observatory
   Charlottesville, Virginia