> I've just been upgrading my app to fltk 1.3 with cocoa... great work,
> and thanks for doing this!
>
> That said, I was getting messed up drawing, and I traced it to the
> following code:
>
> DEBUG("BEFORE " << draw_area);
> fl_push_clip(draw_area.x, draw_area.y, draw_area.w, draw_area.h);
> fl_clip_box(0, 0, 9999, 9999, draw_area.x, draw_area.y,
> draw_area.w, draw_area.h);
> DEBUG("AFTER " << draw_area);
>
> The result is that the width and height come out one pixel less than
> they went in. I also had a problem where draw_area.h == 0 wasn't
> clipping at all. So I checked out Fl_cocoa.mm:MacRectRegionIntersect
> and it looks like CGRectIntersection is indeed chopping off the width
> and height.
>
> I'm suspicious that fltk's idea of a rectangle is inclusive of the
> right and bottom edge, while OS X's idea is exclusive. The OS X doc I
> could find didn't say one way or the other.
>
> Also, the next line:
>
> if (!CGRectIsEmpty(test)) outr->rects[j++] = test;
>
> Why ignore an empty rect? If I want to push a disjoint or zero sized
> clip, I would expect everything to be clipped out.
>
Could you, please, post a simple code example that displays
the problem ? This would be very helpful.
Also, specify whether you are on snow leopard or not, because
there are small peculiarities of snow leopard on this topic.
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev