• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSUnionRect
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: NSUnionRect (From: Shawn Erickson <email@hidden>)

  • Prev by Date: Re: Unfathomable CIImage - Really get crazy about it
  • Next by Date: Re: Subclass of NSMutableDictionary hanging
  • Previous by thread: Re: NSUnionRect
  • Next by thread: Re: Preventing beach balls
  • Index(es):
    • Date
    • Thread