Re: CGRectUnion with one empty Rectangle
Re: CGRectUnion with one empty Rectangle
- Subject: Re: CGRectUnion with one empty Rectangle
- From: Shawn Erickson <email@hidden>
- Date: Wed, 20 May 2009 14:45:39 -0700
On Wed, May 20, 2009 at 1:00 PM, John Harper <email@hidden> wrote:
> CGRectZero is the rectangle at point (0, 0) with zero size. For an empty
> rectangle that will work correctly with CGRectUnion you need to use
> CGRectNull instead.
I guess the docs need to be corrected then since the following implies
CGRectZero will work as well (still not sure why a zero width/height
rectangle should add to a union since be definition it has not
extent/area).
"if one of the rectangles has 0 (or negative) width or height, a copy
of the other rectangle is returned;"
-Shawn
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden