CLIM mail archive
[Prev][Next][Index][Thread]
Moving objects and incremental redisplay
CLIM 2.0beta2
ACL 4.2beta2
Sparc
Hi:
I am having a problem with incremental redisplay when I "move" the
bounding rectangle of an object that is displayed in an application
pane. What I do is draw the representation of a sequence of objects
by drawing them each at the position and size of their bounding
rectangle (each object has clim:standard-bounding-rectangle as a
component). Then, to move an object I just adjust its bounding
rectangle position. All of this is done in an application pane of
type :application with :incremental-redisplay t. The drawing of each
object is surrounded by a clim:updating-output form whose cache value
is a counter ("tick") that I increment when something about the
appearance of the object has changed (e.g. like the text drawn inside
the bounding rectangle, or its color).
What is happening is that when I move an object, all the objects that
were drawn "after" the moved object are displaced an amount equivalent
to the displacement of the moved object. That is, if I move an object
to the right, all objects that were drawn "after" the moved object are
also displaced to the right an equivalent amount. Also, if I move an
object "over" another object, then move it off that object, the hidden
object's appearance is trashed.
I am not "ticking" all objects after a move operation so incremental
redisplay is not being run on the unmoved objects. I am ticking the
object that is moved and it appears in the correct position. Note
that all this works correctly if I don't wrap the display of each
object in a clim:updating-output.
It seems to me that I should not have to tick an object (and as such
cause its display code to be run by incremental redisplay) if its
*appearance* has not changed. It is debatable whether "moving" an
object really is changing its "appearance" - I think not. Its just a
change of the object's location. Maybe I shouldn't even have to tick
the object that was moved.
My question is, shouldn't I be able to update positions of the
displayed representation of a moved object while also maintaining the
correct position of the unmoved objects and do so without having to
resort to redrawing the "correct" set of objects thru incremental
redisplay? Also, an object shouldn't have to know that it was
"hidden" by another object which was moved off of it. All of this
seems to be the responsibility of the output recording facility and
its interaction with incremental redisplay. What do I have to do in
order to achieve the desired affect (that is all objects appearing at
their correct position and hidden objects not having a trashed
appearance) using the output recording facility? Is this the correct
approach? (It seems pretty expensive to have to blindly redraw
everything when an object is moved - kinda defeats the purpose of
incremental redisplay doesn't it?)
Thanks
ba
Brian H. Anderson (206) 234-0881
Boeing Commercial Airplane Co. bha@ata.ca.boeing.com
P.O. Box 3707 M.S. 6A-PX
Seattle, Wa. 98124-2207
Follow-Ups:
Main Index |
Thread Index