# RectangleFRectangleFRectangleFRectangleF Struct

## 定義

``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)``````

RectangleFRectangleFRectangleFRectangleF

## 建構函式

 RectangleF(PointF, SizeF) RectangleF(PointF, SizeF) RectangleF(PointF, SizeF) RectangleF(PointF, SizeF) 使用指定的位置和大小來初始化 RectangleF 類別的新執行個體。Initializes a new instance of the RectangleF class with the specified location and size. RectangleF(Single, Single, Single, Single) RectangleF(Single, Single, Single, Single) RectangleF(Single, Single, Single, Single) RectangleF(Single, Single, Single, Single) 使用指定的位置和大小來初始化 RectangleF 類別的新執行個體。Initializes a new instance of the RectangleF class with the specified location and size.

## 欄位

 Empty Empty Empty Empty 表示成員未初始化的 RectangleF 類別的執行個體。Represents an instance of the RectangleF class with its members uninitialized.

## 屬性

 Bottom Bottom Bottom Bottom 取得 Y 座標，其為這個 Y 結構之 Height 和 RectangleF 的總和。Gets the y-coordinate that is the sum of Y and Height of this RectangleF structure. Height Height Height Height 取得或設定這個 RectangleF 結構的高度。Gets or sets the height of this RectangleF structure. IsEmpty IsEmpty IsEmpty IsEmpty 取得值，這個值表示這個 RectangleF 的 Width 或 Height 屬性是否具有零值。Gets a value that indicates whether the Width or Height property of this RectangleF has a value of zero. Left Left Left Left 取得這個 RectangleF 結構左邊緣的 X 座標。Gets the x-coordinate of the left edge of this RectangleF structure. Location Location Location Location 取得或設定這個 RectangleF 結構的左上角座標。Gets or sets the coordinates of the upper-left corner of this RectangleF structure. Right Right Right Right 取得 X 座標，其為這個 X 結構之 Width 和 RectangleF 的總和。Gets the x-coordinate that is the sum of X and Width of this RectangleF structure. Size Size Size Size 取得或設定這個 RectangleF 的大小。Gets or sets the size of this RectangleF. Top Top Top Top 取得這個 RectangleF 結構上邊緣的 Y 座標。Gets the y-coordinate of the top edge of this RectangleF structure. Width Width Width Width 取得或設定這個 RectangleF 結構的寬度。Gets or sets the width of this RectangleF structure. X X X X 取得或設定這個 RectangleF 結構的左上角 X 座標。Gets or sets the x-coordinate of the upper-left corner of this RectangleF structure. Y Y Y Y 取得或設定這個 RectangleF 結構的左上角 Y 座標。Gets or sets the y-coordinate of the upper-left corner of this RectangleF structure.

## 方法

 Contains(PointF) Contains(PointF) Contains(PointF) Contains(PointF) 判斷指定的點是否包含在這個 RectangleF 結構內。Determines if the specified point is contained within this RectangleF structure. Contains(RectangleF) Contains(RectangleF) Contains(RectangleF) Contains(RectangleF) 判斷由 `rect` 表示的矩形區域是否完全包含在這個 RectangleF 結構中。Determines if the rectangular region represented by `rect` is entirely contained within this RectangleF structure. Contains(Single, Single) Contains(Single, Single) Contains(Single, Single) Contains(Single, Single) 判斷指定的點是否包含在這個 RectangleF 結構內。Determines if the specified point is contained within this RectangleF structure. Equals(RectangleF) Equals(RectangleF) Equals(RectangleF) Equals(RectangleF) Equals(Object) Equals(Object) Equals(Object) Equals(Object) 測試 `obj` 是否為具有和這個 RectangleF 相同位置和大小的 RectangleF。Tests whether `obj` is a RectangleF with the same location and size of this RectangleF. FromLTRB(Single, Single, Single, Single) FromLTRB(Single, Single, Single, Single) FromLTRB(Single, Single, Single, Single) FromLTRB(Single, Single, Single, Single) 建立 RectangleF 結構，左上角和右下角位在指定的位置。Creates a RectangleF structure with upper-left corner and lower-right corner at the specified locations. GetHashCode() GetHashCode() GetHashCode() GetHashCode() 取得這個 RectangleF 結構的雜湊程式碼。Gets the hash code for this RectangleF structure. 如需使用雜湊碼的資訊，請參閱 `Object.GetHashCode`。For information about the use of hash codes, see `Object.GetHashCode`. Inflate(SizeF) Inflate(SizeF) Inflate(SizeF) Inflate(SizeF) 根據指定的數量來放大這個 RectangleF。Enlarges this RectangleF by the specified amount. Inflate(Single, Single) Inflate(Single, Single) Inflate(Single, Single) Inflate(Single, Single) 根據指定的數量，放大這個 RectangleF 結構。Enlarges this RectangleF structure by the specified amount. Inflate(RectangleF, Single, Single) Inflate(RectangleF, Single, Single) Inflate(RectangleF, Single, Single) Inflate(RectangleF, Single, Single) 建立並傳回指定之 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. Intersect(RectangleF, RectangleF) Intersect(RectangleF, RectangleF) Intersect(RectangleF, RectangleF) Intersect(RectangleF, RectangleF) 傳回 RectangleF 結構，這個結構表示兩個矩形的交集。Returns a RectangleF structure that represents the intersection of two rectangles. 如果沒有交集，則會傳回空的 RectangleF。If there is no intersection, and empty RectangleF is returned. Intersect(RectangleF) Intersect(RectangleF) Intersect(RectangleF) Intersect(RectangleF) 以這個 RectangleF 結構和指定 RectangleF 結構的交集，來取代該結構本身。Replaces this RectangleF structure with the intersection of itself and the specified RectangleF structure. IntersectsWith(RectangleF) IntersectsWith(RectangleF) IntersectsWith(RectangleF) IntersectsWith(RectangleF) 判斷這個矩形是否與 `rect` 交集。Determines if this rectangle intersects with `rect`. Offset(PointF) Offset(PointF) Offset(PointF) Offset(PointF) 以指定的數量調整這個矩形的位置。Adjusts the location of this rectangle by the specified amount. Offset(Single, Single) Offset(Single, Single) Offset(Single, Single) Offset(Single, Single) 以所指定數量來調整這個矩形的位置。Adjusts the location of this rectangle by the specified amount. ToString() ToString() ToString() ToString() 將這個 Size 的 `Location` 和 RectangleF 轉換成人們可讀取的 (Human-Readable) 字串。Converts the `Location` and Size of this RectangleF to a human-readable string. Union(RectangleF, RectangleF) Union(RectangleF, RectangleF) Union(RectangleF, RectangleF) Union(RectangleF, RectangleF) 建立最小可能的第三個矩形，這個矩形包含形成聯集的兩個矩形。Creates the smallest possible third rectangle that can contain both of two rectangles that form a union.

## 運算子

 Equality(RectangleF, RectangleF) Equality(RectangleF, RectangleF) Equality(RectangleF, RectangleF) Equality(RectangleF, RectangleF) 測試兩個 RectangleF 結構是否具有相等的位置和大小。Tests whether two RectangleF structures have equal location and size. Implicit(Rectangle to RectangleF) Implicit(Rectangle to RectangleF) Implicit(Rectangle to RectangleF) Implicit(Rectangle to RectangleF) 將指定的 Rectangle 結構轉換成 RectangleF 結構。Converts the specified Rectangle structure to a RectangleF structure. Inequality(RectangleF, RectangleF) Inequality(RectangleF, RectangleF) Inequality(RectangleF, RectangleF) Inequality(RectangleF, RectangleF) 測試兩個 RectangleF 結構的位置或大小是否不同。Tests whether two RectangleF structures differ in location or size.