## RectangleF.FromPoints method

Creates a new [`Rectangle`](../../rectangle/) from two points specified. Two verticles of the created [`Rectangle`](../../rectangle/) will be equal to the passed *point1* and *point2*. These would be typically the opposite vertices.

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

| Parameter | Type | Description |
| --- | --- | --- |
| point1 | PointF | The first [`Point`](../../point/) for the new rectangle. |
| point2 | PointF | The second [`Point`](../../point/) for the new rectangle. |

### Return Value

A newly created [`Rectangle`](../../rectangle/).

### See Also

* struct [PointF](../../pointf/)
* struct [RectangleF](../)
* namespace [Aspose.Imaging](../../rectanglef/)
* assembly [Aspose.Imaging](../../../)


