• 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: Two NSRects adjacent/touching?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two NSRects adjacent/touching?


  • Subject: Re: Two NSRects adjacent/touching?
  • From: Gordon Apple <email@hidden>
  • Date: Wed, 27 Jun 2007 10:48:54 -0500

    This will not give the desired result to the question.  The Intersection
routines will indicate no intersection for adjacent or touching rectangles.
I have taken issue with these intersection routines before and highly
recommend that you write your own routines to do what you want.  (It only
takes a few minutes.)


>> Is there a simple way to determine if two NSRects are
>> touching/adjacent to each other?
>
>  Search the documentation for NSRect. You'll find NSIntersectsRect
> (), NSIntersectionRect() NSContainsRect(), and many other useful
> NSRect-related methods.
>

_______________________________________________

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

  • Prev by Date: Re: Guidance for learner
  • Next by Date: How to detect clipping of text in NSTextView?
  • Previous by thread: Re: Two NSRects adjacent/touching?
  • Next by thread: Explicitly changing first responder
  • Index(es):
    • Date
    • Thread