Click or drag to resize

Rectangle Methods

The Rectangle type exposes the following members.

Methods
  NameDescription
Public methodadd
Computes the union of this rectangle and the passed point, storing the result in this rectangle.
Public methodAdd
Computes the union of this rectangle and the passed rectangle, storing the result in this rectangle.
Public methodCompareTo
Public methodcontainedBy
Determine whether this rectangle is contained by the passed rectangle
Public methodContains
Determine whether this rectangle contains the passed rectangle
Public methoddistance
Return the distance between a rectangle and a point. If the rectangle contains the point, the distance is zero.
Public methodDistance(Point)
Return the distance between this rectangle and the passed point. If the rectangle contains the point, the distance is zero.
Public methodDistance(Rectangle)
Return the distance between this rectangle and the passed rectangle. If the rectangles overlap, the distance is zero.
Public methoddistanceSq
Get the square of the distance between two points.
Public methodedgeOverlaps
Determine whether an edge of this rectangle overlies the equivalent edge of the passed rectangle
Public methodStatic memberenlargement
Calculate the area by which a rectangle would be enlarged if added to the passed rectangle
Public methodEnlargement
Calculate the area by which this rectangle would be enlarged if added to the passed rectangle. Neither rectangle is altered.
Public methodEquals
Public methodGetHashCode
Customized hash code using the coordinates of the rectangle 37 * minX * minY * maxX * maxY
(Overrides ValueTypeGetHashCode.)
Public methodIntersects
Determine whether this rectangle intersects the passed rectangle
Public methodsameObject
Determine whether this rectangle is the same as another object. Note that two rectangles can be equal but not the same object, if they both have the same bounds.
Public methodset
Sets the size of this rectangle to equal the passed rectangle.
Public methodToString
Return a string representation of this rectangle, in the form: (1.2, 3.4), (5.6, 7.8)
(Overrides ValueTypeToString.)
Public methodunion
Find the the union of this rectangle and the passed rectangle.Neither rectangle is altered
Top
See Also