Export (0) Print
Expand All

Rectangle Methods

The Rectangle type exposes the following members.

  Name Description
Public method Static member Ceiling Converts the specified RectangleF structure to a Rectangle structure by rounding the RectangleF values to the next higher integer values.
Public method Contains(Point) Determines if the specified point is contained within this Rectangle structure.
Public method Contains(Rectangle) Determines if the rectangular region represented by rect is entirely contained within this Rectangle structure.
Public method Contains(Int32, Int32) Determines if the specified point is contained within this Rectangle structure.
Public method Equals Tests whether obj is a Rectangle structure with the same location and size of this Rectangle structure. (Overrides ValueType.Equals(Object).)
Public method Static member FromLTRB Creates a Rectangle structure with the specified edge locations.
Public method GetHashCode Returns the hash code for this Rectangle structure. For information about the use of hash codes, see GetHashCode . (Overrides ValueType.GetHashCode().)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Inflate(Size) Enlarges this Rectangle by the specified amount.
Public method Inflate(Int32, Int32) Enlarges this Rectangle by the specified amount.
Public method Static member Inflate(Rectangle, Int32, Int32) Creates and returns an enlarged copy of the specified Rectangle structure. The copy is enlarged by the specified amount. The original Rectangle structure remains unmodified.
Public method Intersect(Rectangle) Replaces this Rectangle with the intersection of itself and the specified Rectangle.
Public method Static member Intersect(Rectangle, Rectangle) Returns a third Rectangle structure that represents the intersection of two other Rectangle structures. If there is no intersection, an empty Rectangle is returned.
Public method IntersectsWith Determines if this rectangle intersects with rect.
Public method Offset(Point) Adjusts the location of this rectangle by the specified amount.
Public method Offset(Int32, Int32) Adjusts the location of this rectangle by the specified amount.
Public method Static member Round Converts the specified RectangleF to a Rectangle by rounding the RectangleF values to the nearest integer values.
Public method ToString Converts the attributes of this Rectangle to a human-readable string. (Overrides ValueType.ToString().)

In XNA Framework 3.0, this member is inherited from Object.ToString().
Public method Static member Truncate Converts the specified RectangleF to a Rectangle by truncating the RectangleF values.
Public method Static member Union Gets a Rectangle structure that contains the union of two Rectangle structures.
Top
Show:
© 2014 Microsoft