[mcclim-devel] Weird gray regions bug in Clouseau

Gilbert Baumann gilbert at base-engineering.com
Mon Dec 5 12:04:33 UTC 2005


Christophe Rhodes <csr21 at cam.ac.uk> writes:

> Gilbert Baumann <gilbert at base-engineering.com> writes:
> 
> > Doing
> >
> >   (defmethod note-sheet-transformation-changed ((sheet mirrored-sheet-mixin))
> >     (update-mirror-geometry sheet)
> > +   (mapc #'update-mirror-geometry (sheet-children sheet)))
> >
> > seems to help.
> 
> Does this recurse all the way down the hierarchy, or does it stop at
> the first generation of children?

It should recurse all the way down, so it might have ugly performance
implications. We might however stop recursion as soon as nothing
changes.

I noticed another ugly thing: Suppose a sheet S with its region SR and
its transformation T within a viewport V with region VR. 
UPDATE-MIRROR-GEOMETRY works by recognizing that only

 (SR o T) ^ VR 

is potentially visible. For example say the sheet S is 1000 pixel
height and the viewport is 100 pixels high. Further suppose S is
scrolled so that y=200 in S maps to y=0 in V. Then the potentially
visible y range (in S) is only [200, 300) so the mirror region of S is
actually set to something 300 pixels high. 

Now you scroll a bit, making y=210 in S mapping y=0 in V. The
potential visibile y range now is [210,310) leading to a mirror region
310 pixels high. In this case scrolling will actually resize the mirror.

That is UPDATE-MIRROR-GEOMETRY is not clever enough to recognize, that
it could make the mirror region larger [and here actually up to the
orignal size] and thus avoid resizing on scrolling. If it were smart
enough it could even lead to allocating an even larger mirror region
of saying 2000 pixels high (in contract to the 1000 high sheet region)
and thereby avoiding resizing the sheet in case more content is
spilled to S. E.g. if S is a stream pane and you output a couple more
lines.

-- 
Gilbert Baumann                        base engineering gmbh, Norderstedt
gilbert at base-engineering.com             http://www.base-engineering.com/



More information about the mcclim-devel mailing list