Function

NSIntegralRectWithOptions(_:_:)

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

Declaration

func NSIntegralRectWithOptions(_ aRect: NSRect, _ opts: AlignmentOptions) -> NSRect

Return Value

A copy of aRect, modified based on the options. The options are defined in NSAlignmentOptions.

See Also

Managing Rectangles

func NSContainsRect(NSRect, NSRect)

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

func NSEqualRects(NSRect, NSRect)

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

func NSIsEmptyRect(NSRect)

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

func NSHeight(NSRect)

Returns the height of a given rectangle.

func NSInsetRect(NSRect, CGFloat, CGFloat)

Insets a rectangle by a specified amount.

func NSIntegralRect(NSRect)

Adjusts the sides of a rectangle to integer values.

func NSIntersectionRect(NSRect, NSRect)

Calculates the intersection of two rectangles.

func NSIntersectsRect(NSRect, NSRect)

Returns a Boolean value that indicates whether two rectangles intersect.

func NSMakeRect(CGFloat, CGFloat, CGFloat, CGFloat)

Creates a new NSRect from the specified values.

func NSMaxX(NSRect)

Returns the largest x coordinate of a given rectangle.

func NSMaxY(NSRect)

Returns the largest y coordinate of a given rectangle.

func NSMidX(NSRect)

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

func NSMidY(NSRect)

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

func NSMinX(NSRect)

Returns the smallest x coordinate of a given rectangle.

func NSMinY(NSRect)

Returns the smallest y coordinate of a given rectangle.

func NSMouseInRect(NSPoint, NSRect, Bool)

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

func NSOffsetRect(NSRect, CGFloat, CGFloat)

Offsets the rectangle by the specified amount.

func NSPointInRect(NSPoint, NSRect)

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

func NSRectFromString(String)

Returns a rectangle from a text-based representation.

func NSStringFromRect(NSRect)

Returns a string representation of a rectangle.

func NSRectFromCGRect(CGRect)

Returns an NSRect typecast from a CGRect.

func NSRectToCGRect(NSRect)

Returns a CGRect typecast from an NSRect.

func NSUnionRect(NSRect, NSRect)

Calculates the union of two rectangles.

func NSWidth(NSRect)

Returns the width of the specified rectangle.