[mcclim-devel] :clipping-region woes

Sumant Oemrawsingh soemraws at xs4all.nl
Wed Jul 8 10:34:43 UTC 2009


Hi guys,

I'm having some problems with clipping regions (or I just don't understand the
concept, which is still entirely possible).

In the clim-listener, in the package clim-user, I do the following:

(with-room-for-graphics (t)
  (draw-rectangle* *standard-output* -10 -10 10 10))

This gives a black, filled rectangle. Great, just as expected. Now, I want to
try to define a clipping region:

(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.

So, I try the following:

(with-room-for-graphics (t)
  (draw-rectangle* *standard-output* -10 -10 10 10
                   :clipping-region (make-rectangle* -20 -20 20 20)))

Since the clipping region is _larger_ than the actual drawing, I expect to see
the same as in the first sexp, where I didn't define any clipping region.
Nevertheless, I see... NOTHING!

Is this a bug, a feature, or am I hopelessly ignorant and should just give up
ever trying to do anything remotely complicated in clim?

Thanks,
Sumant
-- 
Sumant Oemrawsingh
soemraws at xs4all.nl




More information about the mcclim-devel mailing list