C# Class Monobjc.Foundation.NSRect

Show file Open project: Monobjc/monobjc Class Usage Examples

Public Properties

Property Type Description
NSZeroRect NSRect

Private Properties

Property Type Description
NSRectFromCGRect NSRect
NSRectFromString NSRect
NSRectToCGRect Monobjc.ApplicationServices.CGRect
NSStringFromRect NSString

Public Methods

Method Description
ContainsRect ( NSRect aRect ) : bool

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

DivideRect ( NSRect &slice, NSRect &remainder, CGFloat amount, NSRectEdge edge ) : void

Divides this rectangle into two new rectangles.

InsetRect ( float dX, float dY ) : NSRect

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

IntegralRect ( ) : NSRect

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

IntersectionRect ( NSRect aRect ) : NSRect

Calculates the intersection of this rectangle with the specified rectangle.

IntersectsRect ( NSRect aRect ) : bool

Returns a Boolean value that indicates whether this rectangle and the specified rectangle intersect.

MouseInRect ( NSPoint aPoint, bool isFlipped ) : bool

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

NSContainsRect ( NSRect aRect, NSRect bRect ) : bool

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

Original declaration is : BOOL NSContainsRect(NSRect aRect, NSRect bRect)

NSDivideRect ( NSRect inRect, NSRect &slice, NSRect &remainder, CGFloat amount, NSRectEdge edge ) : void

Divides a rectangle into two new rectangles.

Original declaration is : void NSDivideRect(NSRect inRect, NSRect *slice, NSRect *remainder, float amount, NSRectEdge edge)

NSEqualRects ( NSRect aRect, NSRect bRect ) : bool

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

Original declaration is : BOOL NSEqualRects(NSRect aRect, NSRect bRect)

NSHeight ( NSRect aRect ) : float

Returns the height of a given rectangle.

Original declaration is : float NSHeight(NSRect aRect)

NSInsetRect ( NSRect aRect, float dX, float dY ) : NSRect

Insets a rectangle by a specified amount.

Original declaration is : NSRect NSInsetRect(NSRect aRect, float dX, float dY)

NSIntegralRect ( NSRect aRect ) : NSRect

Adjusts the sides of a rectangle to integer values.

Original declaration is : NSRect NSIntegralRect(NSRect aRect)

NSIntersectionRect ( NSRect aRect, NSRect bRect ) : NSRect

Calculates the intersection of two rectangles.

Original declaration is : NSRect NSIntersectionRect(NSRect aRect, NSRect bRect)

NSIntersectsRect ( NSRect aRect, NSRect bRect ) : bool

Returns a Boolean value that indicates whether two rectangles intersect.

Original declaration is : BOOL NSIntersectsRect(NSRect aRect, NSRect bRect)

NSIsEmptyRect ( NSRect aRect ) : bool

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

Original declaration is : BOOL NSIsEmptyRect(NSRect aRect)

NSMakeRect ( float x, float y, float w, float h ) : NSRect

Creates a new NSRect from the specified values.

Original declaration is : NSRect NSMakeRect(float x, float y, float w, float h)

NSMaxX ( NSRect aRect ) : CGFloat

Returns the largest x coordinate of a given rectangle.

Original declaration is : float NSMaxX(NSRect aRect)

NSMaxY ( NSRect aRect ) : CGFloat

Returns the largest y coordinate of a given rectangle.

Original declaration is : float NSMaxY(NSRect aRect)

NSMidX ( NSRect aRect ) : CGFloat

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

Original declaration is : float NSMidX(NSRect aRect)

NSMidY ( NSRect aRect ) : CGFloat

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

Original declaration is : float NSMidY(NSRect aRect)

NSMinX ( NSRect aRect ) : CGFloat

Returns the smallest x coordinate of a given rectangle.

Original declaration is : float NSMinX(NSRect aRect)

NSMinY ( NSRect aRect ) : CGFloat

Returns the smallest y coordinate of a given rectangle.

Original declaration is : float NSMinY(NSRect aRect)

NSMouseInRect ( NSPoint aPoint, NSRect aRect, bool isFlipped ) : bool

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

Original declaration is : BOOL NSMouseInRect(NSPoint aPoint, NSRect aRect, BOOL isFlipped)

NSOffsetRect ( NSRect aRect, CGFloat dX, CGFloat dY ) : NSRect

Offsets the rectangle by the specified amount.

Original declaration is : NSRect NSOffsetRect(NSRect aRect, float dX, float dY)

NSPointInRect ( NSPoint aPoint, NSRect aRect ) : bool

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

Original declaration is : BOOL NSPointInRect(NSPoint aPoint, NSRect aRect)

NSUnionRect ( NSRect aRect, NSRect bRect ) : NSRect

Calculates the union of two rectangles.

Original declaration is : NSRect NSUnionRect(NSRect aRect, NSRect bRect)

NSWidth ( NSRect aRect ) : float

Returns the width of the specified rectangle.

Original declaration is : float NSWidth(NSRect aRect)

OffsetRect ( CGFloat dX, CGFloat dY ) : NSRect

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

PointInRect ( NSPoint aPoint ) : bool

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

UnionRect ( NSRect aRect ) : NSRect

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

Private Methods

Method Description
NSRectFromCGRect ( CGRect cgrect ) : NSRect
NSRectFromString ( [ MarshalTypeRef = typeof(IdMarshaler<NSString>))]NSStringaString ) : NSRect
NSRectToCGRect ( NSRect nsrect ) : CGRect
NSStringFromRect ( NSRect aRect ) : NSString

Method Details

ContainsRect() public method

Returns a Boolean value that indicates whether this rectangle completely encloses another.
public ContainsRect ( NSRect aRect ) : bool
aRect NSRect
return bool

DivideRect() public method

Divides this rectangle into two new rectangles.
public DivideRect ( NSRect &slice, NSRect &remainder, CGFloat amount, NSRectEdge edge ) : void
slice NSRect
remainder NSRect
amount Monobjc.ApplicationServices.CGFloat
edge NSRectEdge
return void

InsetRect() public method

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

IntegralRect() public method

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

IntersectionRect() public method

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

IntersectsRect() public method

Returns a Boolean value that indicates whether this rectangle and the specified rectangle intersect.
public IntersectsRect ( NSRect aRect ) : bool
aRect NSRect
return bool

MouseInRect() public method

Returns a Boolean value that indicates whether the point is in the rectangle.
public MouseInRect ( NSPoint aPoint, bool isFlipped ) : bool
aPoint NSPoint
isFlipped bool
return bool

NSContainsRect() public static method

Returns a Boolean value that indicates whether one rectangle completely encloses another.
Original declaration is : BOOL NSContainsRect(NSRect aRect, NSRect bRect)
public static NSContainsRect ( NSRect aRect, NSRect bRect ) : bool
aRect NSRect
bRect NSRect
return bool

NSDivideRect() public static method

Divides a rectangle into two new rectangles.
Original declaration is : void NSDivideRect(NSRect inRect, NSRect *slice, NSRect *remainder, float amount, NSRectEdge edge)
public static NSDivideRect ( NSRect inRect, NSRect &slice, NSRect &remainder, CGFloat amount, NSRectEdge edge ) : void
inRect NSRect
slice NSRect
remainder NSRect
amount Monobjc.ApplicationServices.CGFloat
edge NSRectEdge
return void

NSEqualRects() public static method

Returns a Boolean value that indicates whether the two rectangles are equal.
Original declaration is : BOOL NSEqualRects(NSRect aRect, NSRect bRect)
public static NSEqualRects ( NSRect aRect, NSRect bRect ) : bool
aRect NSRect
bRect NSRect
return bool

NSHeight() public static method

Returns the height of a given rectangle.
Original declaration is : float NSHeight(NSRect aRect)
public static NSHeight ( NSRect aRect ) : float
aRect NSRect
return float

NSInsetRect() public static method

Insets a rectangle by a specified amount.
Original declaration is : NSRect NSInsetRect(NSRect aRect, float dX, float dY)
public static NSInsetRect ( NSRect aRect, float dX, float dY ) : NSRect
aRect NSRect
dX float
dY float
return NSRect

NSIntegralRect() public static method

Adjusts the sides of a rectangle to integer values.
Original declaration is : NSRect NSIntegralRect(NSRect aRect)
public static NSIntegralRect ( NSRect aRect ) : NSRect
aRect NSRect
return NSRect

NSIntersectionRect() public static method

Calculates the intersection of two rectangles.
Original declaration is : NSRect NSIntersectionRect(NSRect aRect, NSRect bRect)
public static NSIntersectionRect ( NSRect aRect, NSRect bRect ) : NSRect
aRect NSRect
bRect NSRect
return NSRect

NSIntersectsRect() public static method

Returns a Boolean value that indicates whether two rectangles intersect.
Original declaration is : BOOL NSIntersectsRect(NSRect aRect, NSRect bRect)
public static NSIntersectsRect ( NSRect aRect, NSRect bRect ) : bool
aRect NSRect
bRect NSRect
return bool

NSIsEmptyRect() public static method

Returns a Boolean value that indicates whether a given rectangle is empty.
Original declaration is : BOOL NSIsEmptyRect(NSRect aRect)
public static NSIsEmptyRect ( NSRect aRect ) : bool
aRect NSRect
return bool

NSMakeRect() public static method

Creates a new NSRect from the specified values.
Original declaration is : NSRect NSMakeRect(float x, float y, float w, float h)
public static NSMakeRect ( float x, float y, float w, float h ) : NSRect
x float
y float
w float
h float
return NSRect

NSMaxX() public static method

Returns the largest x coordinate of a given rectangle.
Original declaration is : float NSMaxX(NSRect aRect)
public static NSMaxX ( NSRect aRect ) : CGFloat
aRect NSRect
return Monobjc.ApplicationServices.CGFloat

NSMaxY() public static method

Returns the largest y coordinate of a given rectangle.
Original declaration is : float NSMaxY(NSRect aRect)
public static NSMaxY ( NSRect aRect ) : CGFloat
aRect NSRect
return Monobjc.ApplicationServices.CGFloat

NSMidX() public static method

Returns the x coordinate of a given rectangle�s midpoint.
Original declaration is : float NSMidX(NSRect aRect)
public static NSMidX ( NSRect aRect ) : CGFloat
aRect NSRect
return Monobjc.ApplicationServices.CGFloat

NSMidY() public static method

Returns the y coordinate of a given rectangle�s midpoint.
Original declaration is : float NSMidY(NSRect aRect)
public static NSMidY ( NSRect aRect ) : CGFloat
aRect NSRect
return Monobjc.ApplicationServices.CGFloat

NSMinX() public static method

Returns the smallest x coordinate of a given rectangle.
Original declaration is : float NSMinX(NSRect aRect)
public static NSMinX ( NSRect aRect ) : CGFloat
aRect NSRect
return Monobjc.ApplicationServices.CGFloat

NSMinY() public static method

Returns the smallest y coordinate of a given rectangle.
Original declaration is : float NSMinY(NSRect aRect)
public static NSMinY ( NSRect aRect ) : CGFloat
aRect NSRect
return Monobjc.ApplicationServices.CGFloat

NSMouseInRect() public static method

Returns a Boolean value that indicates whether the point is in the specified rectangle.
Original declaration is : BOOL NSMouseInRect(NSPoint aPoint, NSRect aRect, BOOL isFlipped)
public static NSMouseInRect ( NSPoint aPoint, NSRect aRect, bool isFlipped ) : bool
aPoint NSPoint
aRect NSRect
isFlipped bool
return bool

NSOffsetRect() public static method

Offsets the rectangle by the specified amount.
Original declaration is : NSRect NSOffsetRect(NSRect aRect, float dX, float dY)
public static NSOffsetRect ( NSRect aRect, CGFloat dX, CGFloat dY ) : NSRect
aRect NSRect
dX Monobjc.ApplicationServices.CGFloat
dY Monobjc.ApplicationServices.CGFloat
return NSRect

NSPointInRect() public static method

Returns a Boolean value that indicates whether a given point is in a given rectangle.
Original declaration is : BOOL NSPointInRect(NSPoint aPoint, NSRect aRect)
public static NSPointInRect ( NSPoint aPoint, NSRect aRect ) : bool
aPoint NSPoint
aRect NSRect
return bool

NSUnionRect() public static method

Calculates the union of two rectangles.
Original declaration is : NSRect NSUnionRect(NSRect aRect, NSRect bRect)
public static NSUnionRect ( NSRect aRect, NSRect bRect ) : NSRect
aRect NSRect
bRect NSRect
return NSRect

NSWidth() public static method

Returns the width of the specified rectangle.
Original declaration is : float NSWidth(NSRect aRect)
public static NSWidth ( NSRect aRect ) : float
aRect NSRect
return float

OffsetRect() public method

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

PointInRect() public method

Returns a Boolean value that indicates whether a given point is in a specified rectangle.
public PointInRect ( NSPoint aPoint ) : bool
aPoint NSPoint
return bool

UnionRect() public method

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

Property Details

NSZeroRect public static property

A NSRect with its origin and size set to zero.
public static NSRect,Monobjc.Foundation NSZeroRect
return NSRect