Show / Hide Table of Contents

Class Rectangle

Represents an area on a coordinate plane.

Inheritance
System.Object
Rectangle
Namespace: Mannequin.Bindings
Assembly: Collapse.dll
Syntax
public class Rectangle : object

Constructors

Rectangle(Point, Int32, Int32)

Create a new Rectangle.

Declaration
public Rectangle(Point loc, int width, int height)
Parameters
Type Name Description
Point loc

The top-left Point of this Rectangle

System.Int32 width

The width of this Rectangle

System.Int32 height

The height of this Rectangle

Properties

Bottom

The lowestmost y-coordinate in this Rectangle

Declaration
public int Bottom { get; }
Property Value
Type Description
System.Int32

Center

The center Point of this Rectangle

Declaration
public Point Center { get; }
Property Value
Type Description
Point

Height

The height of this Rectangle

Declaration
public int Height { get; }
Property Value
Type Description
System.Int32

IsEmpty

Whether this Rectangle has a Width and Height of 0, and a Location of (0, 0).

Declaration
public bool IsEmpty { get; }
Property Value
Type Description
System.Boolean

Left

The leftmost x-coordinate in this Rectangle

Declaration
public int Left { get; }
Property Value
Type Description
System.Int32

Location

The top-left Point of this Rectangle

Declaration
public Point Location { get; }
Property Value
Type Description
Point

Right

The rightmost x-coordinate in this Rectangle

Declaration
public int Right { get; }
Property Value
Type Description
System.Int32

Top

The highestmost y-coordinate in this Rectangle

Declaration
public int Top { get; }
Property Value
Type Description
System.Int32

Width

The width of this Rectangle

Declaration
public int Width { get; }
Property Value
Type Description
System.Int32

Methods

Contains(Point)

Whether this Rectangle contains pt.

Declaration
public bool Contains(Point pt)
Parameters
Type Name Description
Point pt

The point to check

Returns
Type Description
System.Boolean

Whether this Rectangle contains pt

Inflate(Int32, Int32)

Adjust this Rectangle's size

Declaration
public void Inflate(int horiz, int vert)
Parameters
Type Name Description
System.Int32 horiz

The horizontal amount

System.Int32 vert

The vertical amount

Intersects(Rectangle)

Whether this Rectangle intersects another Rectangle

Declaration
public bool Intersects(Rectangle rect)
Parameters
Type Name Description
Rectangle rect

The Rectangle to check

Returns
Type Description
System.Boolean

Whether rect intersects this Rectangle

Back to top © 2020 Anarkis Gaming. All rights reserved. Generated by DocFX