RectHelper.FromCoordinatesAndDimensions 方法

定义

基于 Rect 结构的元素值创建新的 Rect 值。 C# 和 Microsoft Visual Basic 代码应改用 Rect (Double、Double、Double、Double) 构造函数。

public:
 static Rect FromCoordinatesAndDimensions(float x, float y, float width, float height);
 static Rect FromCoordinatesAndDimensions(float const& x, float const& y, float const& width, float const& height);
public static Rect FromCoordinatesAndDimensions(float x, float y, float width, float height);
function fromCoordinatesAndDimensions(x, y, width, height)
Public Shared Function FromCoordinatesAndDimensions (x As Single, y As Single, width As Single, height As Single) As Rect

参数

x
Single

float

要为 X 设置的像素值。

y
Single

float

要为 Y 设置的像素值。

width
Single

float

要为 Width 设置的像素值。

height
Single

float

要为 Height 设置的像素值。

返回

创建的 Rect

适用于