日期:2013-07-01  浏览次数:20428 次

给你看看它的定义
Note: This topic is not complete for RTM, nor has it been handed off to localization.
Enter bugs for inaccurate, not incomplete, information using the following RAID template.

This is preliminary documentation and subject to change.
Send feedback on this topic.


Stores the location and size of a rectangular region. For more advanced region functions use a Region object.

For a list of all members of this type, see Rectangle Members.

Object
   ValueType
      Rectangle

[Visual Basic]
<TypeConverter(X, ConverterTypeName="System.Drawing.RectangleConverter, System.Drawing, Version=1.0.2411.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")>
Public Structure Rectangle
[C#]
[TypeConverter(X, ConverterTypeName="System.Drawing.RectangleConverter, System.Drawing, Version=1.0.2411.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public struct Rectangle
[C++]
[TypeConverter(X, ConverterTypeName="System.Drawing.RectangleConverter, System.Drawing, Version=1.0.2411.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public __value struct Rectangle
[JScript] In JScript, you can use the structures in the .NET Framework, but you cannot define your own.

Remarks
A rectangle is defined by its upper-left corner, width, and height.

Requirements
Namespace: System.Drawing

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000

Assembly: System.Drawing (in System.Drawing.dll)

See Also
Rectangle Members | System.Drawing Namespace | Region


Syntax based on build 2609.


Note: This topic is not complete for RTM, nor has it been handed off to localization.
Enter bugs for inaccurate, not incomplete, information using the following RAID template.

This is preliminary documentation and subject to change.
Send feedback on this topic.


Public Static (Shared) Fields
Empty Stores the location and size of a rectangular region. For more advanced region functions use a Region object.

Public Static (Shared) Methods
FromLTRB Creates a new Rectangle with the specified location and size.
Inflate Overloaded. Inflates this Rectangle by the specified amount.
Intersect Overloaded. [To be supplied.]
Union Creates a rectangle that represents the union between a and b.

Public Static (Shared) Operators
Equality Operator Tests whether two Rectangle objects have equal location and size.
Inequality Operator Tests whether two Rectangle objects differ in location or size.

Public Instance Constructors
Rectangle Constructor Overloaded. Initializes a new instance of the Rectangle class.

Public Instance Properties
Bottom Gets the y-coordinate of the lower-right corner of the rectangular region defined by this Rectangle.
Height Gets or sets the width of the rectangular region defined by this Rectangle.
IsEmpty Tests whether this Rectangle has a Width or a Height of 0.
Left Gets the x-coordinate of the upper-left corner of the rectangular region defined by this Rectangle.
Location Gets or sets the coordinates of the upper-left corner of the rectangular region represented by this Rectangle.
Right Gets the x-coordinate of the lower-right corner of the rectangular region defined by this Rectangle.
Size Gets or sets the size of this Rectangle.
Top Gets the y-coordinate of the upper-left corner of the rectangular region defined by this Rectangle.
Width Gets or sets the width of the rectangular region defined by this Rectangle.
X Gets or sets the x-coordinate of the upper-left corner of the rectangular region defined by this Rectangle.
Y Gets or sets the y-coordinate of the upper-left corner of the rectangular