CLIM mail archive


Minor bounding box problem

I have defined a new border type with the following:

(clim:define-border-type :ellipse (stream left top right bottom)
  (let ((cx (/ (+ left right) 2))
        (cy (/ (+ top bottom) 2))
        (rx (+ 8 (/ (- right left) 2)))
        (ry (+ 8 (/ (- bottom top) 2))) )
    (clim:draw-ellipse* stream cx cy rx 0 0 ry :filled nil))

I use this border type to draw some nodes in a graph (using 
surrounding-output-with-border).  These nodes are later selectable.  The 
problem is that when they are highlighted, the box that surrounds the node is
at least one pixel too low.  This is a minor detail.  However, when the node
is erased, part of the ellipse remains on the display, because it is outside
the bounding box.  The bounding box should run tangent to the ellipse, but
actually cuts through it on my display.

Is this a known problem?  Does it have an easy fix?  BTW, I'm running Allegro
CLIM 1.1 on a Sparc 1+.


Randy A. Coulman                |       ARIES Laboratory
                                |       Department of Computational Science             |       University of Saskatchewan
                                |       Saskatoon, SK   S7N 0W0             


Main Index | Thread Index