[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MCL 2.0.1 wierdness
- To: bill (Bill St. Clair), firstname.lastname@example.org
- Subject: Re: MCL 2.0.1 wierdness
- From: email@example.com (Kalman Reti)
- Date: Thu, 10 Nov 1994 11:39:23 -0500
- Cc: firstname.lastname@example.org
- Sender: email@example.com
At 9:06 AM 11/10/94 -0500, Bill St. Clair wrote:
>At 9:53 PM 11/9/94, firstname.lastname@example.org 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?
Maybe that's what it is supposed to do, but the code currently uses view-clip-region
to get the clip region it calls #_SetClip on. That means if you change what that
returns while inside a with-focused-view, it is permanent.
>>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:
> (loop for obj in list-of-objects
> do (with-focused-view view
> (set-clip-region some-other-region)
> (draw obj))))
A workaround is to use #_SetClip directly inside the loop (instead of
calling set-clip-region), e.g.
(loop for obj in list-of-objects
do (with-focused-view view
(#_SetClip :ptr some-other-region)
>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.