I do the following:
CGContextClipToRect(contextRef, myCGRect);
where myCGRect = {(15,653), (757,15)};
Then, right after setting the clip, I get it to make sure it worked.
Here's the code
CGRect clipCGRect = CGContextGetClipBoundingBox(contextRef);
and I get clipCGRect = {(inf, inf), (0,0)}
Any idea why this might not be working? I can set clipping just fine
in other pieces of code. Just not this one. Error codes would be nice
;)
BTW: I've also done a simple clip rect that was 15,15 and failed as
well.
Thanks,
-Mike
Eric VERGNAUD - 29 Nov 2004 10:17 GMT
dans l'article 4ec9206a.0411281448.6d294c0e@posting.google.com, Mike à
mikegarcia2000@yahoo.com a écrit le 28/11/04 23:48 :
> I do the following:
> CGContextClipToRect(contextRef, myCGRect);
[quoted text clipped - 16 lines]
> Thanks,
> -Mike
Obviously you know that CGContextClipToRect "Sets the clipping path to the
intersection of the current clipping path with the area defined by the
specified rectangle".
So if you call CGContextGetClipBoundingBox before calling
CGContextClipToRect, you'll probably find that clipCGRect is already null.
I wish we had a method to enlarge the clipping rect without saving the
context state.
Eric