CGRectContainsPoint is not inclusive of boundary points

Originator:alancse
Number:rdar://7684419 Date Originated:25-Feb-2010
Status:Closed Resolved:6-Apr-2010
Product:Documentation Product Version:
Classification: Reproducible:
 
CGRectContainsPoint will return false if you provide it a point that is on the boundary of the CGRect.

I understand that the strict definition of contains means that this function is performing as it should.

However most developers (myself included at first) will expect these points to be considered 'contained' by the CGRect.

To save developers in the future a lot of time (and possibly obscure bugs). It would be great if we could get a little note on this function that reminds us that points on the CGRect boundary are not considered to be 'contained'.

Relevant documentation is here: 

http://developer.apple.com/mac/library/documentation/cocoa/Reference/ApplicationKit/Classes/NSEvent_Class/Reference/Reference.html#//apple_ref/doc/uid/20000016-BBCIGACJ

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!