The Rectangle type exposes the following members.

Constructors

  NameDescription
Public methodRectangle()()()()
Create an empty rectangle at position (0,0).
Public methodRectangle(Rectangle)
Create a rectangle from a System.Drawing.RectangleF.
Public methodRectangle(RectangleF)
Create a rectangle from a System.Drawing.RectangleF.
Public methodRectangle(Rectangle)
Create a rectangle from a Rectangle.
Public methodRectangle(Rectangle, Transform)
Create a rectangle from an existing rectangle.
Public methodRectangle(Double, Double, Double, Double)
Create new rectangle at the given position and with the specified width and height.
Public methodRectangle(Double, Double, Double, Double, Transform)
Create a rectangle with the given position and size, and apply the given transformation to it.

Methods

  NameDescription
Public methodContains(Point)
Tests whether the given coordinate is inside the rectangle.
Public methodContains(Rectangle)
Tests whether the given rectangle is contained in this one.
Public methodCreateGdiRectangle
Converts the rectangle to the System.Drawing.Rectangle equivalent
Public methodCreateGdiRectangleF
Converts the rectangle to the System.Drawing.RectangleF equivalent
Public methodEquals
Returns true if the argument object equals this rectangle.
(Overrides Object..::..Equals(Object).)
Public methodGetHashCode
Returns the hash code for this instance.
(Overrides Object..::..GetHashCode()()()().)
Public methodIntersectsWith
Tests whether the given rectangle intersects with this one.

Operators

  NameDescription
Public operatorStatic memberEquality
Compares two rectangles.
Public operatorStatic memberInequality
Compares two rectangles.

Properties

  NameDescription
Public propertyHeight
Height of the rectangle
Public propertyWidth
Width of the rectangle
Public propertyX
X coordinate of the rectangle
Public propertyY
Y coordinate of the rectangle

See Also