[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Graphical presentations in CLIM
Hi,
I'm trying to generate tiny, graphical representations of some data
structures and use them in routines like FORMAT-GRAPH-FROM-ROOT and
FORMATTING-TABLE. All of the drawing routines need absolute
coordinates.
What is the philosophy behind drawing iconic representations of
structures? Currently I assume the upper left corner is 0,0 and that
Y increases downward. So, for example,
(defun present-frob (frob stream)
(draw-rectangle* stream 0 0 100 100 ) :ink (frob-color frob))
would draw a 100x100 rectangle filled with the ink of my frob.
I find strange behavior from Allegro's CLIM whenever I resize a window
containing frob presentations. If I have a large graph of many FROBS
of different colors, the window will flash huge blobs of color and
then leave large color blobs after the initial refresh. If the FROB
is more elaborate and uses lines, arcs, and circles, I see huge versions
of these same curves upon resizing.
What am I doing wrong? Is there some macrology I'm leaving out, i.e.,
should I write something like:
(defun present-frob (frob stream)
(clim:these-coordinates-are-merely-canonical-and-not-absolute (stream)
(clim:draw-rectangle* stream 0 0 100 100 ) :ink (frob-color frob)))
Any hints would be greatly appreciated. (btw, WITH-LOCAL-COORDINATES
and WITH-ROOM-FOR-GRAPHICS don't work in this case and yield even
stranger behaviors in CLIM:FORMAT-* functions).
Scott