C# Class Monobjc.ApplicationServices.CGRect

Show file Open project: Monobjc/monobjc Class Usage Examples

Public Properties

Property Type Description
CGRectZero CGRect

Public Methods

Method Description
CGRectContainsPoint ( CGRect rect, CGPoint point ) : int

Indicates whether a rectangle contains a specified point.

Original declaration is : int CGRectContainsPoint ( CGRect rect, CGPoint point );

CGRectContainsRect ( CGRect rect1, CGRect rect2 ) : int

Indicates whether the first rectangle contains the second rectangle.

Original declaration is : int CGRectContainsRect ( CGRect rect1, CGRect rect2 );

CGRectDivide ( CGRect rect, CGRect &slice, CGRect &remainder, CGFloat amount, CGRectEdge edge ) : void

Divides a source rectangle into two component rectangles.

Original declaration is : void CGRectDivide ( CGRect rect, CGRect *slice, CGRect *remainder, float amount, CGRectEdge edge );

CGRectEqualToRect ( CGRect rect1, CGRect rect2 ) : int

Indicates whether two rectangles are equal in size and position.

Original declaration is : int CGRectEqualToRect ( CGRect rect1, CGRect rect2 );

CGRectGetHeight ( CGRect rect ) : float

Returns the height of a rectangle.

Original declaration is : float CGRectGetHeight ( CGRect rect );

CGRectGetMaxX ( CGRect rect ) : float

Returns the x-axis coordinate that establishes the right edge of a rectangle.

Original declaration is : float CGRectGetMaxX ( CGRect rect );

CGRectGetMaxY ( CGRect rect ) : float

Returns the y-axis coordinate that establishes the top edge of a rectangle.

Original declaration is : float CGRectGetMaxY ( CGRect rect );

CGRectGetMidX ( CGRect rect ) : float

Returns the x-axis coordinate that establishes the center of a rectangle.

Original declaration is : float CGRectGetMidX ( CGRect rect );

CGRectGetMidY ( CGRect rect ) : float

Returns the y-axis coordinate that establishes the center of a rectangle.

Original declaration is : float CGRectGetMidY ( CGRect rect );

CGRectGetMinX ( CGRect rect ) : float

Returns the x-axis coordinate that establishes the left edge of a rectangle.

Original declaration is : float CGRectGetMinX ( CGRect rect );

CGRectGetMinY ( CGRect rect ) : float

Returns the y-axis coordinate that establishes the bottom edge of a rectangle.

Original declaration is : float CGRectGetMinY ( CGRect rect );

CGRectGetWidth ( CGRect rect ) : float

Returns the width of a rectangle.

Original declaration is : float CGRectGetWidth ( CGRect rect );

CGRectInset ( CGRect rect, CGFloat dx, CGFloat dy ) : CGRect

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

Original declaration is : CGRect CGRectInset ( CGRect rect, float dx, float dy );

CGRectIntegral ( CGRect rect ) : CGRect

Returns a rectangle with integer values for its origin and size.

Original declaration is : CGRect CGRectIntegral ( CGRect rect );

CGRectIntersection ( CGRect rect1, CGRect rect2 ) : CGRect

Returns the intersection of two rectangles.

Original declaration is : CGRect CGRectIntersection ( CGRect rect1, CGRect rect2 );

CGRectIntersectsRect ( CGRect rect1, CGRect rect2 ) : int

Indicates whether two rectangles intersect.

Original declaration is : int CGRectIntersectsRect ( CGRect rect1, CGRect rect2 );

CGRectIsEmpty ( CGRect rect ) : int

Indicates whether a rectangle has zero width or height or is a null rectangle.

Original declaration is : int CGRectIsEmpty ( CGRect rect );

CGRectIsInfinite ( CGRect rect ) : bool

Checks whether a rectangle is infinite.

Original declaration is : bool CGRectIsInfinite ( CGRect rect );

CGRectIsNull ( CGRect rect ) : int

Indicates whether a rectangle is invalid.

Original declaration is : int CGRectIsNull ( CGRect rect );

CGRectMake ( CGFloat x, CGFloat y, CGFloat width, CGFloat height ) : CGRect

Returns a rectangle structure constructed from coordinate and dimension values you provide.

Original declaration is : CGRect CGRectMake ( float x, float y, float width, float height );

CGRectOffset ( CGRect rect, CGFloat dx, CGFloat dy ) : CGRect

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

Original declaration is : CGRect CGRectOffset ( CGRect rect, float dx, float dy );

CGRectStandardize ( CGRect rect ) : CGRect

Returns a rectangle with a positive width and height.

Original declaration is : CGRect CGRectStandardize ( CGRect rect );

CGRectUnion ( CGRect r1, CGRect r2 ) : CGRect

Returns the smallest rectangle that contains two other specified rectangles.

Original declaration is : CGRect CGRectUnion ( CGRect r1, CGRect r2 );

ContainsRect ( CGRect aRect ) : int

Returns an int value that indicates whether this rectangle completely encloses another.

DivideRect ( CGRect &slice, CGRect &remainder, CGFloat amount, CGRectEdge edge ) : void

Divides this rectangle into two new rectangles.

InsetRect ( CGFloat dX, CGFloat dY ) : CGRect

Creates a rectangle that insets this rectangle by a specified amount.

IntegralRect ( ) : CGRect

Creates a rectangle with the sides of this rectangle to integer values.

IntersectionRect ( CGRect aRect ) : CGRect

Calculates the intersection of this rectangle with the specified rectangle.

IntersectsRect ( CGRect aRect ) : int

Returns an int value that indicates whether this rectangle and the specified rectangle intersect.

OffsetRect ( CGFloat dX, CGFloat dY ) : CGRect

Creates a rectangle that offsets this rectangle by the specified amount.

PointInRect ( CGPoint aPoint ) : int

Returns an int value that indicates whether a given point is in a specified rectangle.

UnionRect ( CGRect aRect ) : CGRect

Creates a rectangle as the union of this rectangle and the specified rectangle.

Method Details

CGRectContainsPoint() public static method

Indicates whether a rectangle contains a specified point.
Original declaration is : int CGRectContainsPoint ( CGRect rect, CGPoint point );
public static CGRectContainsPoint ( CGRect rect, CGPoint point ) : int
rect CGRect The rectangle to examine.
point CGPoint The point to examine.
return int

CGRectContainsRect() public static method

Indicates whether the first rectangle contains the second rectangle.
Original declaration is : int CGRectContainsRect ( CGRect rect1, CGRect rect2 );
public static CGRectContainsRect ( CGRect rect1, CGRect rect2 ) : int
rect1 CGRect The rectangle to examine for containment of the rectangle passed in rect2.
rect2 CGRect The rectangle to examine for being contained in the rectangle passed in rect1.
return int

CGRectDivide() public static method

Divides a source rectangle into two component rectangles.
Original declaration is : void CGRectDivide ( CGRect rect, CGRect *slice, CGRect *remainder, float amount, CGRectEdge edge );
public static CGRectDivide ( CGRect rect, CGRect &slice, CGRect &remainder, CGFloat amount, CGRectEdge edge ) : void
rect CGRect The source rectangle.
slice CGRect On input, a pointer to an uninitialized rectangle. On return, a rectangle that contains the specified edge and extends the distance beyond it specified by the amount parameter.
remainder CGRect On input, a pointer to an uninitialized rectangle. On return, the rectangle contains the portion of the source rectangle that remains after CGRectEdge produces the 'slice' rectangle.
amount CGFloat A distance from the rectangle's side that is specified in the edge parameter. This distance defines the line, parallel to the specified side, that Quartz uses to divide the source rectangle.
edge CGRectEdge A CGRectEdge value (CGRectMinXEdge, CGRectMinYEdge, CGRectMaxXEdge, or CGRectMaxYEdge) that specifies the side of the rectangle from which the distance passed in the amount parameter is measured. CGRectDivide produces a 'slice' rectangle that contains the specified edge and extends amount distance beyond it.
return void

CGRectEqualToRect() public static method

Indicates whether two rectangles are equal in size and position.
Original declaration is : int CGRectEqualToRect ( CGRect rect1, CGRect rect2 );
public static CGRectEqualToRect ( CGRect rect1, CGRect rect2 ) : int
rect1 CGRect The first rectangle to examine.
rect2 CGRect The second rectangle to examine.
return int

CGRectGetHeight() public static method

Returns the height of a rectangle.
Original declaration is : float CGRectGetHeight ( CGRect rect );
public static CGRectGetHeight ( CGRect rect ) : float
rect CGRect The rectangle to examine.
return float

CGRectGetMaxX() public static method

Returns the x-axis coordinate that establishes the right edge of a rectangle.
Original declaration is : float CGRectGetMaxX ( CGRect rect );
public static CGRectGetMaxX ( CGRect rect ) : float
rect CGRect The rectangle to examine.
return float

CGRectGetMaxY() public static method

Returns the y-axis coordinate that establishes the top edge of a rectangle.
Original declaration is : float CGRectGetMaxY ( CGRect rect );
public static CGRectGetMaxY ( CGRect rect ) : float
rect CGRect The rectangle to examine.
return float

CGRectGetMidX() public static method

Returns the x-axis coordinate that establishes the center of a rectangle.
Original declaration is : float CGRectGetMidX ( CGRect rect );
public static CGRectGetMidX ( CGRect rect ) : float
rect CGRect The rectangle to examine.
return float

CGRectGetMidY() public static method

Returns the y-axis coordinate that establishes the center of a rectangle.
Original declaration is : float CGRectGetMidY ( CGRect rect );
public static CGRectGetMidY ( CGRect rect ) : float
rect CGRect The rectangle to examine.
return float

CGRectGetMinX() public static method

Returns the x-axis coordinate that establishes the left edge of a rectangle.
Original declaration is : float CGRectGetMinX ( CGRect rect );
public static CGRectGetMinX ( CGRect rect ) : float
rect CGRect The rectangle to examine.
return float

CGRectGetMinY() public static method

Returns the y-axis coordinate that establishes the bottom edge of a rectangle.
Original declaration is : float CGRectGetMinY ( CGRect rect );
public static CGRectGetMinY ( CGRect rect ) : float
rect CGRect The rectangle to examine.
return float

CGRectGetWidth() public static method

Returns the width of a rectangle.
Original declaration is : float CGRectGetWidth ( CGRect rect );
public static CGRectGetWidth ( CGRect rect ) : float
rect CGRect The rectangle to examine.
return float

CGRectInset() public static method

Returns a rectangle that is smaller or larger than the source rectangle, with the same center point.
Original declaration is : CGRect CGRectInset ( CGRect rect, float dx, float dy );
public static CGRectInset ( CGRect rect, CGFloat dx, CGFloat dy ) : CGRect
rect CGRect The source rectangle.
dx CGFloat The value by which to adjust the x-coordinates of the source rectangle. To create an inset rectangle, specify a positive value. To create a larger, encompassing rectangle, specify a negative value.
dy CGFloat The value by which to adjust the y-coordinates of the source rectangle. To create an inset rectangle, specify a positive value. To create a larger, encompassing rectangle, specify a negative value.
return CGRect

CGRectIntegral() public static method

Returns a rectangle with integer values for its origin and size.
Original declaration is : CGRect CGRectIntegral ( CGRect rect );
public static CGRectIntegral ( CGRect rect ) : CGRect
rect CGRect The source rectangle.
return CGRect

CGRectIntersection() public static method

Returns the intersection of two rectangles.
Original declaration is : CGRect CGRectIntersection ( CGRect rect1, CGRect rect2 );
public static CGRectIntersection ( CGRect rect1, CGRect rect2 ) : CGRect
rect1 CGRect The first source rectangle.
rect2 CGRect The second source rectangle.
return CGRect

CGRectIntersectsRect() public static method

Indicates whether two rectangles intersect.
Original declaration is : int CGRectIntersectsRect ( CGRect rect1, CGRect rect2 );
public static CGRectIntersectsRect ( CGRect rect1, CGRect rect2 ) : int
rect1 CGRect The first rectangle to examine.
rect2 CGRect The second rectangle to examine.
return int

CGRectIsEmpty() public static method

Indicates whether a rectangle has zero width or height or is a null rectangle.
Original declaration is : int CGRectIsEmpty ( CGRect rect );
public static CGRectIsEmpty ( CGRect rect ) : int
rect CGRect The rectangle to examine.
return int

CGRectIsInfinite() public static method

Checks whether a rectangle is infinite.
Original declaration is : bool CGRectIsInfinite ( CGRect rect );
public static CGRectIsInfinite ( CGRect rect ) : bool
rect CGRect The rectangle to examine.
return bool

CGRectIsNull() public static method

Indicates whether a rectangle is invalid.
Original declaration is : int CGRectIsNull ( CGRect rect );
public static CGRectIsNull ( CGRect rect ) : int
rect CGRect The rectangle to examine.
return int

CGRectMake() public static method

Returns a rectangle structure constructed from coordinate and dimension values you provide.
Original declaration is : CGRect CGRectMake ( float x, float y, float width, float height );
public static CGRectMake ( CGFloat x, CGFloat y, CGFloat width, CGFloat height ) : CGRect
x CGFloat The x-coordinate of the rectangle's origin point.
y CGFloat The y-coordinate of the rectangle's origin point.
width CGFloat The width of the rectangle.
height CGFloat The height of the rectangle.
return CGRect

CGRectOffset() public static method

Returns a rectangle with an origin offset from that of the source rectangle.
Original declaration is : CGRect CGRectOffset ( CGRect rect, float dx, float dy );
public static CGRectOffset ( CGRect rect, CGFloat dx, CGFloat dy ) : CGRect
rect CGRect The source rectangle.
dx CGFloat The value by which to move the x-coordinate of the source rectangle's origin.
dy CGFloat The value by which to move the y-coordinate of the source rectangle's origin.
return CGRect

CGRectStandardize() public static method

Returns a rectangle with a positive width and height.
Original declaration is : CGRect CGRectStandardize ( CGRect rect );
public static CGRectStandardize ( CGRect rect ) : CGRect
rect CGRect The source rectangle.
return CGRect

CGRectUnion() public static method

Returns the smallest rectangle that contains two other specified rectangles.
Original declaration is : CGRect CGRectUnion ( CGRect r1, CGRect r2 );
public static CGRectUnion ( CGRect r1, CGRect r2 ) : CGRect
r1 CGRect The first source rectangle.
r2 CGRect The second source rectangle.
return CGRect

ContainsRect() public method

Returns an int value that indicates whether this rectangle completely encloses another.
public ContainsRect ( CGRect aRect ) : int
aRect CGRect
return int

DivideRect() public method

Divides this rectangle into two new rectangles.
public DivideRect ( CGRect &slice, CGRect &remainder, CGFloat amount, CGRectEdge edge ) : void
slice CGRect
remainder CGRect
amount CGFloat
edge CGRectEdge
return void

InsetRect() public method

Creates a rectangle that insets this rectangle by a specified amount.
public InsetRect ( CGFloat dX, CGFloat dY ) : CGRect
dX CGFloat
dY CGFloat
return CGRect

IntegralRect() public method

Creates a rectangle with the sides of this rectangle to integer values.
public IntegralRect ( ) : CGRect
return CGRect

IntersectionRect() public method

Calculates the intersection of this rectangle with the specified rectangle.
public IntersectionRect ( CGRect aRect ) : CGRect
aRect CGRect
return CGRect

IntersectsRect() public method

Returns an int value that indicates whether this rectangle and the specified rectangle intersect.
public IntersectsRect ( CGRect aRect ) : int
aRect CGRect
return int

OffsetRect() public method

Creates a rectangle that offsets this rectangle by the specified amount.
public OffsetRect ( CGFloat dX, CGFloat dY ) : CGRect
dX CGFloat
dY CGFloat
return CGRect

PointInRect() public method

Returns an int value that indicates whether a given point is in a specified rectangle.
public PointInRect ( CGPoint aPoint ) : int
aPoint CGPoint
return int

UnionRect() public method

Creates a rectangle as the union of this rectangle and the specified rectangle.
public UnionRect ( CGRect aRect ) : CGRect
aRect CGRect
return CGRect

Property Details

CGRectZero public static property

A CGRect with its origin and size set to zero.
public static CGRect,Monobjc.ApplicationServices CGRectZero
return CGRect