From: Patrick Logan
Subject: LispView and structured graphics
Date: 
Message-ID: <1992Feb26.171948.29551@PDX.MENTORG.COM>
[I was unable to get mail through, so I am posting this.]

   From: ·······@arc.ab.ca (Roy Masrani)
   1.  How can I get graphics objects to persist upon a "refresh" event?
   i.e.  I draw a rectangle on a base window; refreshing the screen
   erases it!

I have not used LispView in particular, but this is a general graphics
question which comes up often. LispView is probably like most other
low level window/graphic systems where the graphics you draw are one
shot things, i.e. there is no memory of them when the window needs to
be redrawn.

Therefore you need to provide the memory of the items drawn in each
window. This can be as simple as specifying a backing store (bit- or
pixmap) that the window system automatically uses for refresh, or it
can be a simple list of items that you explicitly redraw when asked
(e.g. from refresh event). If necessary you can replace the list with
an efficient structure for doing "hit detects", e.g. finding only the
items within a certain rectangle of the window. This way you only
redraw the portions of the window that really do need to be redrawn
(the rectangle may originate from the refresh event structure). This
is a win if your drawing is complex. The same structure can be used to
"select" items given mouse coordinates from a mouse click, etc.
--
Patrick Logan, ······@mentorg.com,
Voice: (503) 685-7000 x2907, FAX: (503) 685-1282
Mentor Graphics Corp., Bldg. C, 8005 SW Boeckman Rd., Wilsonville, OR 97070

-- 
Patrick Logan, ······@mentorg.com,
Voice: (503) 685-7000 x2907, FAX: (503) 685-1282
Mentor Graphics Corp., Bldg. C, 8005 SW Boeckman Rd., Wilsonville, OR 97070
From: Don Brown
Subject: Re: LispView and structured graphics
Date: 
Message-ID: <DBROWN.92Feb28144141@gr.cs.utah.edu>
The way to refresh in Lispview is to attach a method to an instance of
the damage-interest class (or a sublcass of it). That method will be evaluated
anytime something "damaging" happens to the window, like getting buried and
then uncovered.

Don