Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: CGRectGetWidth vs. CGRect.size.width
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CGRectGetWidth vs. CGRect.size.width



On Thursday, March 14, 2002, at 01:51 AM, Matt Gough wrote:

Am I missing something obvious, but it there any purpose in calling
CGRectGetWidth as opposed to accessing CGRect.size.width directly? I realize
that accessing width directly will be quicker, but can the two methods ever
return different results?

CGRectGetWidth/Height will normalize the width or height before returning them. Normalization is basically just checking if the width or height is negative, and negating it to make it positive if so.

-eric
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.

References: 
 >CGRectGetWidth vs. CGRect.size.width (From: Matt Gough <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.