[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MCL 2.0.1 wierdness
- To: abegel@media.mit.edu
- Subject: Re: MCL 2.0.1 wierdness
- From: bill (Bill St. Clair)
- Date: Thu, 10 Nov 94 09:06:19 -0500
- Cc: info-mcl@cambridge.apple.com
- Sender: owner-info-mcl@cambridge.apple.com
At 9:53 PM 11/9/94, abegel@media.mit.edu wrote:
>I'm seeing a strange behavior in MCL.
>
>when I do
>(loop for obj in list-of-objects
> do (with-focused-view view
> (set-clip-region some-other-region)
> (draw obj)))
>
>I get strange clipping problems. The clipping regions are just wrong.
>Yet, if inside the with-focused-view, I put in a thing to save the
>current clip-region and then restore after the (draw obj) while still in the
>loop, it works.
>Isn't (with-focused-view supposed to reset the view's clipping region? Even
>if I set it differently inside?
Yes.
>
>What's up with this?
The only thing I can think of is that your code is being called
when view is already focused, in which case the with-focused-view
in the loop is a nop, and any drawing that happens after the loop
exits will still see the last value of some-other-region
as the clip region. Try changing it to:
(with-focused-view nil
(loop for obj in list-of-objects
do (with-focused-view view
(set-clip-region some-other-region)
(draw obj))))
If that doesn't work, and you can distill your code into a
small, self contained, example that illustrates the problem,
I'll look at it.