Re: NSUnionRect
Re: NSUnionRect
- Subject: Re: NSUnionRect
- From: Gordon Apple <email@hidden>
- Date: Sat, 03 Mar 2007 11:57:14 -0600
Guilty as charged. Why would I read the docs? I've successfully used
the same thing before in other frameworks. I just assumed it would work the
logical way. I guess the expected result doesn't exist either. Oh well, it
only took me a couple of minutes to write one that worked the way I
expected. Sorry. I tried the list to no avail, but should have checked the
docs. My excuse -- It was late and I had just traced a problem to it.
Maybe it would be useful to add something like NSUnionRectFromPoints(int
n, NSPointArray points)
> As documented,
> http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Miscellane
> ous/Foundation_Functions/Reference/reference.html#/
> /apple_ref/c/func/NSUnionRect. Basically a 0 by 0 rectangle is
> considered to be non-existent for purposes of unioning; this enables a
> number of rect operations to be performed in tandem.
>
> On Mar 2, 2007, at 11:23 PM, Gordon Apple wrote:
>
>> The list search is dead tonight.
>>
>> What's with NSUnionRect? I am getting a result of (0,0,0,0) when
>> evaluating NSUnionRect with (0,600,0,0) and (400,600,0,0). The
>> correct
>> result should be (0,600,400,0). I was trying to use it to compute the
>> bounding rect of a polygon. I wrote my own to make it work right.
>
> You read the docs for NSUnionRect?
>
> <http://developer.apple.com/documentation/Cocoa/Reference/Foundation/
> Miscellaneous/Foundation_Functions/Reference/reference.html#//
> apple_ref/c/func/NSUnionRect>
>
> -Shawn
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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