Offsets the rectangle by the specified amount.
SDK
- macOS 10.0+
Framework
- Foundation
Offsets the rectangle by the specified amount.
SDK
Framework
func NSContains Rect(NSRect, NSRect) -> Bool
Returns a Boolean value that indicates whether one rectangle completely encloses another.
func NSDivide Rect(NSRect, Unsafe Mutable Pointer<NSRect>, Unsafe Mutable Pointer<NSRect>, CGFloat, NSRect Edge)
Divides a rectangle into two new rectangles.
func NSEqual Rects(NSRect, NSRect) -> Bool
Returns a Boolean value that indicates whether the two rectangles are equal.
func NSIs Empty Rect(NSRect) -> Bool
Returns a Boolean value that indicates whether a given rectangle is empty.
func NSHeight(NSRect) -> CGFloat
Returns the height of a given rectangle.
func NSInset Rect(NSRect, CGFloat, CGFloat) -> NSRect
Insets a rectangle by a specified amount.
func NSIntegral Rect(NSRect) -> NSRect
Adjusts the sides of a rectangle to integer values.
func NSIntegral Rect With Options(NSRect, Alignment Options) -> NSRect
Adjusts the sides of a rectangle to integral values using the specified options.
func NSIntersection Rect(NSRect, NSRect) -> NSRect
Calculates the intersection of two rectangles.
func NSIntersects Rect(NSRect, NSRect) -> Bool
Returns a Boolean value that indicates whether two rectangles intersect.
func NSMake Rect(CGFloat, CGFloat, CGFloat, CGFloat) -> NSRect
Creates a new NSRect
from the specified values.
func NSMax X(NSRect) -> CGFloat
Returns the largest x coordinate of a given rectangle.
func NSMax Y(NSRect) -> CGFloat
Returns the largest y coordinate of a given rectangle.
func NSMid X(NSRect) -> CGFloat
Returns the x coordinate of a given rectangle’s midpoint.
func NSMid Y(NSRect) -> CGFloat
Returns the y coordinate of a given rectangle’s midpoint.
func NSMin X(NSRect) -> CGFloat
Returns the smallest x coordinate of a given rectangle.
func NSMin Y(NSRect) -> CGFloat
Returns the smallest y coordinate of a given rectangle.
func NSMouse In Rect(NSPoint, NSRect, Bool) -> Bool
Returns a Boolean value that indicates whether the point is in the specified rectangle.
func NSPoint In Rect(NSPoint, NSRect) -> Bool
Returns a Boolean value that indicates whether a given point is in a given rectangle.
func NSRect From String(String) -> NSRect
Returns a rectangle from a text-based representation.
func NSString From Rect(NSRect) -> String
Returns a string representation of a rectangle.
func NSRect From CGRect(CGRect) -> NSRect
Returns an NSRect
typecast from a CGRect
.
func NSRect To CGRect(NSRect) -> CGRect
Returns a CGRect
typecast from an NSRect
.
func NSUnion Rect(NSRect, NSRect) -> NSRect
Calculates the union of two rectangles.
func NSWidth(NSRect) -> CGFloat
Returns the width of the specified rectangle.