Type Alias

NSRect

A rectangle.

Declaration

typedef CGRect NSRect;

Discussion

When building for 64 bit systems, or building 32 bit like 64 bit, NSRect is typedef’d to CGRect.

Topics

Managing Rectangles

NSContainsRect

Returns a Boolean value that indicates whether one rectangle completely encloses another.

NSDivideRect

Divides a rectangle into two new rectangles.

NSEqualRects

Returns a Boolean value that indicates whether the two rectangles are equal.

NSIsEmptyRect

Returns a Boolean value that indicates whether a given rectangle is empty.

NSHeight

Returns the height of a given rectangle.

NSInsetRect

Insets a rectangle by a specified amount.

NSIntegralRect

Adjusts the sides of a rectangle to integer values.

NSIntegralRectWithOptions

Adjusts the sides of a rectangle to integral values using the specified options.

NSIntersectionRect

Calculates the intersection of two rectangles.

NSIntersectsRect

Returns a Boolean value that indicates whether two rectangles intersect.

NSMakeRect

Creates a new NSRect from the specified values.

NSMaxX

Returns the largest x coordinate of a given rectangle.

NSMaxY

Returns the largest y coordinate of a given rectangle.

NSMidX

Returns the x coordinate of a given rectangle’s midpoint.

NSMidY

Returns the y coordinate of a given rectangle’s midpoint.

NSMinX

Returns the smallest x coordinate of a given rectangle.

NSMinY

Returns the smallest y coordinate of a given rectangle.

NSMouseInRect

Returns a Boolean value that indicates whether the point is in the specified rectangle.

NSOffsetRect

Offsets the rectangle by the specified amount.

NSPointInRect

Returns a Boolean value that indicates whether a given point is in a given rectangle.

NSRectFromString

Returns a rectangle from a text-based representation.

NSStringFromRect

Returns a string representation of a rectangle.

NSRectFromCGRect

Returns an NSRect typecast from a CGRect.

NSRectToCGRect

Returns a CGRect typecast from an NSRect.

NSUnionRect

Calculates the union of two rectangles.

NSWidth

Returns the width of the specified rectangle.

Zero Constant

NSZeroRect

An NSRect structure set to 0 in width and height.

Constants

NSMinXEdge

The minimum X edge. This is equivalent to CGRectMinXEdge.

NSMinYEdge

The minimum Y edge. This is equivalent to CGRectMinYEdge.

NSMaxXEdge

The maximum X edge. This is equivalent to CGRectMaxXEdge.

NSMaxYEdge

The maximum X edge. This is equivalent to CGRectMaxXEdge.

Related Types

NSAlignmentOptions

Values representing alignment operations.

NSRectArray

Type indicating a parameter is array of NSRect structures.

NSRectPointer

Type indicating a parameter is a pointer to an NSRect structure.

See Also

Geometry

CGFloat

The basic type for all floating-point values.

NSPoint

A point in a Cartesian coordinate system.

NSSize

A two-dimensional size.

NSAffineTransform

A graphics coordinate transformation.

NSEdgeInsets

A description of the distance between the edges of two rectangles.