On Wed, Jul 08, 2009 at 04:39:48PM +0100, Christophe Rhodes wrote:
Sumant Oemrawsingh soemraws@xs4all.nl writes:
(with-room-for-graphics (t) (draw-rectangle* *standard-output* -10 -10 10 10 :clipping-region (make-rectangle* -5 -5 5 5)))
What I expect is that it displays a smaller rectangle, namely the rectangle with side 20 clipped down to a side of 10. However, I don't see anything.
Without looking at the code, my suspicion is that the with-room-for-graphics is at fault -- or at least, it's not transforming the clipping region.
Doing (draw-rectangle* *standard-output* 90 90 100 100 :clipping-region (make-rectangle* 95 95 120 120)) at the Listener gives me a 5-pixel rectangle, as one might expect.
So clipping works at least partially; I don't know exactly what is at fault.
Cheers,
Christophe
So it does. Weird... I thought that with-room-for-graphics was just a macro that encloses the body in a transformation. In that case, how can the clipping region, which is still created inside the body, fall outside of the transformation?
So I guess that with-room-for-graphics wrongly deterimines the size of the graphic after clipping, and just clips the whole thing, or so...
Well, I'm not versed in lisp enough to dive into the actual mcclim source code (but I'll try anyway), so I don't expect I'll find the problem that fast.
Thanks for the help, Sumant