.NET Framework Class Library
Rectangle Members

Stores a set of four integers that represent the location and size of a rectangle. For more advanced region functions, use a Region object.

The Rectangle type exposes the following members.

Constructors

  NameDescription
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkRectangleOverloaded. Initializes a new instance of the Rectangle class with the specified location and size.
Top
Methods

  NameDescription
Public methodStatic memberSupported by the .NET Compact FrameworkCeilingConverts the specified RectangleF structure to a Rectangle structure by rounding the RectangleF values to the next higher integer values.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkContainsOverloaded. Determines if the specified point is contained within the rectangular region defined by this Rectangle.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkEqualsTests whether obj is a Rectangle structure with the same location and size of this Rectangle structure. (Overrides ValueType..::.Equals(Object).)
Protected methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkFinalizeAllows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkFromLTRBCreates a Rectangle structure with the specified edge locations.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkGetHashCodeReturns the hash code for this Rectangle structure. For information about the use of hash codes, see GetHashCode . (Overrides ValueType..::.GetHashCode()()().)
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkInflateOverloaded. Inflates a Rectangle structure by the specified amount.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkIntersectOverloaded. Determines the Rectangle structure that represents the intersection of two rectangles.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkIntersectsWithDetermines if this rectangle intersects with rect.
Protected methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkOffsetOverloaded. Adjusts the location of this rectangle by the specified amount.
Public methodStatic memberSupported by the .NET Compact FrameworkRoundConverts the specified RectangleF to a Rectangle by rounding the RectangleF values to the nearest integer values.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkToStringOverloaded.
Public methodStatic memberSupported by the .NET Compact FrameworkTruncateConverts the specified RectangleF to a Rectangle by truncating the RectangleF values.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkUnionGets a Rectangle structure that contains the union of two Rectangle structures.
Top
Operators

  NameDescription
Public operatorStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkEqualityTests whether two Rectangle structures have equal location and size.
Public operatorStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkInequalityTests whether two Rectangle structures differ in location or size.
Top
Fields

  NameDescription
Public fieldStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkEmptyRepresents a Rectangle structure with its properties left uninitialized.
Top
Properties

  NameDescription
Public propertySupported by the .NET Compact FrameworkSupported by the XNA FrameworkBottomGets the y-coordinate that is the sum of the Y and Height property values of this Rectangle structure.
Public propertySupported by the .NET Compact FrameworkSupported by the XNA FrameworkHeightGets or sets the height of this Rectangle structure.
Public propertySupported by the .NET Compact FrameworkSupported by the XNA FrameworkIsEmptyTests whether all numeric properties of this Rectangle have values of zero.
Public propertySupported by the .NET Compact FrameworkSupported by the XNA FrameworkLeftGets the x-coordinate of the left edge of this Rectangle structure.
Public propertySupported by the .NET Compact FrameworkLocationGets or sets the coordinates of the upper-left corner of this Rectangle structure.
Public propertySupported by the .NET Compact FrameworkSupported by the XNA FrameworkRightGets the x-coordinate that is the sum of X and Width property values of this Rectangle structure.
Public propertySupported by the .NET Compact FrameworkSizeGets or sets the size of this Rectangle.
Public propertySupported by the .NET Compact FrameworkSupported by the XNA FrameworkTopGets the y-coordinate of the top edge of this Rectangle structure.
Public propertySupported by the .NET Compact FrameworkSupported by the XNA FrameworkWidthGets or sets the width of this Rectangle structure.
Public propertySupported by the .NET Compact FrameworkSupported by the XNA FrameworkXGets or sets the x-coordinate of the upper-left corner of this Rectangle structure.
Public propertySupported by the .NET Compact FrameworkSupported by the XNA FrameworkYGets or sets the y-coordinate of the upper-left corner of this Rectangle structure.
Top
See Also

Reference

Tags :


Page view tracker