Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSUnionRect



    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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

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



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.