O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Rects

These functions are used to create and manipulate NSRect structures.

NSContainsRect

BOOL NSContainsRect(NSRect aRect, NSRect bRect)

NSDivideRect

void NSDivideRect(NSRect inRect, NSRect *slice, NSRect *rem, float amount, NSRectEdge edge)

NSEqualRects

BOOL NSEqualRects(NSRect aRect, NSRect bRect)

NSHeight

float NSHeight(NSRect aRect)

NSInsetRect

NSRect NSInsetRect(NSRect aRect, float dX, float dY)

NSIntegralRect

NSRect NSIntegralRect(NSRect aRect)

NSIntersectionRect

NSRect NSIntersectionRect(NSRect aRect, NSRect bRect)

NSIntersectsRect

BOOL NSIntersectsRect(NSRect aRect, NSRect bRect)

NSIsEmptyRect

BOOL NSIsEmptyRect(NSRect aRect)

NSMakeRect

NSRect NSMakeRect(float x, float y, float w, float h)

NSMaxX

float NSMaxX(NSRect aRect)

NSMaxY

float NSMaxY(NSRect aRect)

NSMidX

float NSMidX(NSRect aRect)

NSMidY

float NSMidY(NSRect aRect)

NSMinX

float NSMinX(NSRect aRect)

NSMinY

float NSMinY(NSRect aRect)

NSMouseInRect

BOOL NSMouseInRect(NSPoint aPoint, NSRect aRect, BOOL isFlipped)

NSOffsetRect

NSRect NSOffsetRect(NSRect aRect, float dX, float dY)

NSPointInRect

BOOL NSPointInRect(NSPoint aPoint, NSRect aRect)

NSRectFromString

NSRect NSRectFromString(NSString *aString)

NSStringFromRect

NSString *NSStringFromRect(NSRect aRect)

NSUnionRect

NSRect NSUnionRect(NSRect aRect, NSRect bRect)

NSWidth

float NSWidth(NSRect aRect)

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required