typedef struct _NSRect { NSPoint origin; NSSize size; } NSRect;Using NSRect is similar to using NSPoint and NSSize:
NSRect testRect; testRect = NSMakeRect (8.1, -3, 10, 15); NSLog (@"x origin: %f", testRect.origin.x); // 8.1 NSLog (@"y origin: %f", testRect.origin.y); // -3 NSLog (@"width: %f", testRect.size.width); // 10 NSLog (@"height: %f", testRect.size.height); // 15Note that you first access the origin, and then its coordinates, and similarly for the size.
The constant NSZeroRect represents a rect with NSZeroPoint origin and NSZeroSize size.