共用方式為


RectHelper.FromLocationAndSize(Point, Size) 方法

定義

根據指定左上方原點的Point,以及指定寬度和高度的Size,建立新的Rect值。 C# 和 Microsoft Visual Basic 程式碼應該改用 Rect (Point,Size) 建構函式。

public:
 static Rect FromLocationAndSize(Point location, Size size);
 static Rect FromLocationAndSize(Point const& location, Size const& size);
public static Rect FromLocationAndSize(Point location, Size size);
function fromLocationAndSize(location, size)
Public Shared Function FromLocationAndSize (location As Point, size As Size) As Rect

參數

location
Point

原點位置 (左上方) 。

size
Size

指定寬度和高度的 Size

傳回

建立的 Rect 值。

適用於