## RectangleF.FromPoints method

创建一个新的[`Rectangle`](../../rectangle/)从指定的两个点。创建的两个verticle[`Rectangle`](../../rectangle/)将等于通过*point1*和*point2*.这些通常是相反的顶点。

```csharp
public static RectangleF FromPoints(PointF point1, PointF point2)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| point1 | PointF | 首先[`Point`](../../point/)对于新的矩形。 |
| point2 | PointF | 第二[`Point`](../../point/)对于新的矩形。 |

### 返回值

一个新创建的[`Rectangle`](../../rectangle/).

### 也可以看看

* struct [PointF](../../pointf/)
* struct [RectangleF](../)
* 命名空间 [Aspose.PSD](../../rectanglef/)
* 部件 [Aspose.PSD](../../../)


