Function

CGRectIntegral

Returns the smallest rectangle that results from converting the source rectangle values to integers.

Declaration

CGRect CGRectIntegral(CGRect rect);

Parameters

rect

The source rectangle.

Return Value

A rectangle with the smallest integer values for its origin and size that contains the source rectangle. That is, given a rectangle with fractional origin or size values, CGRectIntegral rounds the rectangle’s origin downward and its size upward to the nearest whole integers, such that the result contains the original rectangle. Returns a null rectangle if rect is a null rectangle.

See Also

Modifying Rectangles

CGRectDivide

Divides a source rectangle into two component rectangles.

CGRectInset

Returns a rectangle that is smaller or larger than the source rectangle, with the same center point.

CGRectIntersection

Returns the intersection of two rectangles.

CGRectOffset

Returns a rectangle with an origin that is offset from that of the source rectangle.

CGRectStandardize

Returns a rectangle with a positive width and height.

CGRectUnion

Returns the smallest rectangle that contains the two source rectangles.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software