# RectangleF 结构

## 定义

``public value class RectangleF : IEquatable<System::Drawing::RectangleF>``
``````[System.Serializable]
public struct RectangleF : IEquatable<System.Drawing.RectangleF>``````
``type RectangleF = struct``
``````Public Structure RectangleF
Implements IEquatable(Of RectangleF)``````

RectangleF

## 构造函数

 用指定的位置和大小初始化 RectangleF 类的新实例。Initializes a new instance of the RectangleF class with the specified location and size. 用指定的位置和大小初始化 RectangleF 类的新实例。Initializes a new instance of the RectangleF class with the specified location and size.

## 字段

 表示其成员未初始化的 RectangleF 类的实例。Represents an instance of the RectangleF class with its members uninitialized.

## 属性

 获取 y 坐标，该坐标是此 RectangleF 结构的 Y 与 Height 之和。Gets the y-coordinate that is the sum of Y and Height of this RectangleF structure. 获取或设置此 RectangleF 结构的高度。Gets or sets the height of this RectangleF structure. 获取一个值，该值指示此 RectangleF 的 Width 或 Height 属性的值是否为零。Gets a value that indicates whether the Width or Height property of this RectangleF has a value of zero. 获取此 RectangleF 结构左边缘的 x 坐标。Gets the x-coordinate of the left edge of this RectangleF structure. 获取或设置此 RectangleF 结构左上角的坐标。Gets or sets the coordinates of the upper-left corner of this RectangleF structure. 获取 x 坐标，该坐标是此 RectangleF 结构的 X 与 Width 之和。Gets the x-coordinate that is the sum of X and Width of this RectangleF structure. 获取或设置此 RectangleF 的大小。Gets or sets the size of this RectangleF. 获取此 RectangleF 结构上边缘的 y 坐标。Gets the y-coordinate of the top edge of this RectangleF structure. 获取或设置此 RectangleF 结构的宽度。Gets or sets the width of this RectangleF structure. 获取或设置此 RectangleF 结构左上角的 x 坐标。Gets or sets the x-coordinate of the upper-left corner of this RectangleF structure. 获取或设置此 RectangleF 结构左上角的 y 坐标。Gets or sets the y-coordinate of the upper-left corner of this RectangleF structure.

## 方法

 确定指定的点是否包含在此 RectangleF 结构内。Determines if the specified point is contained within this RectangleF structure. 确定 `rect` 表示的矩形区域是否完全包含在此 RectangleF 结构内。Determines if the rectangular region represented by `rect` is entirely contained within this RectangleF structure. 确定指定的点是否包含在此 RectangleF 结构内。Determines if the specified point is contained within this RectangleF structure. 测试 `obj` 是否为与此 RectangleF 具有相同位置和大小的 RectangleF。Tests whether `obj` is a RectangleF with the same location and size of this RectangleF. 创建一个 RectangleF 结构，它的左上角和右下角都位于指定位置。Creates a RectangleF structure with upper-left corner and lower-right corner at the specified locations. 获取此 RectangleF 结构的哈希代码。Gets the hash code for this RectangleF structure. 有关如何使用哈希代码的信息，请参见 `Object.GetHashCode`。For information about the use of hash codes, see `Object.GetHashCode`. 创建并返回指定 RectangleF 结构的放大副本。Creates and returns an enlarged copy of the specified RectangleF structure. 该副本被放大指定的量，并且不修改原始矩形。The copy is enlarged by the specified amount and the original rectangle remains unmodified. 将此 RectangleF 结构放大指定量。Enlarges this RectangleF structure by the specified amount. 将此 RectangleF 放大指定量。Enlarges this RectangleF by the specified amount. 将此 RectangleF 结构替换为其自身与指定的 RectangleF 结构的交集。Replaces this RectangleF structure with the intersection of itself and the specified RectangleF structure. 返回表示两个矩形的交集的 RectangleF 结构。Returns a RectangleF structure that represents the intersection of two rectangles. 如果没有交集，将返回一个空的 RectangleF。If there is no intersection, and empty RectangleF is returned. 确定此矩形是否与 `rect` 相交。Determines if this rectangle intersects with `rect`. 将此矩形的位置调整指定的量。Adjusts the location of this rectangle by the specified amount. 将此矩形的位置调整指定的量。Adjusts the location of this rectangle by the specified amount. 将此 RectangleF 的 `Location` 和 Size 转换为可读字符串。Converts the `Location` and Size of this RectangleF to a human-readable string. 创建第三个矩形，它是能够同时包含形成并集的两个矩形的可能的最小矩形。Creates the smallest possible third rectangle that can contain both of two rectangles that form a union.

## 操作员

 测试两个 RectangleF 结构的位置和大小是否相同。Tests whether two RectangleF structures have equal location and size. 将指定的 Rectangle 结构转换为 RectangleF 结构。Converts the specified Rectangle structure to a RectangleF structure. 测试两个 RectangleF 结构的位置或大小是否不同。Tests whether two RectangleF structures differ in location or size.