CLIM mail archive
[Prev][Next][Index][Thread]
Re: Minor bounding box problem
>
> Date: Thu, 20 Aug 1992 16:16 EDT
> From: Jeff Close <jclose@chesapeake.ads.com>
>
> 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))
> )
>
Actually, changing the "/"s above to "truncate"s got the bounding box to line
up correctly. However, all bounding boxes still seem to be off a bit. The
top and left edges will line up exactly, while the bottom and left edges will
be about 1 pixel outside of the object. That's not a big deal, however.
>
>I would say that the CLX back-end is drawing the ellipse a little too
>big, rather than that the bounding box is too small.
>
--
Randy A. Coulman | ARIES Laboratory
| Department of Computational Science
coulman@cs.Usask.ca | University of Saskatchewan
| Saskatoon, SK S7N 0W0
References:
Main Index |
Thread Index