## Rectangle.FromPoints method

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

```csharp
public static Rectangle FromPoints(Point point1, Point point2)
```

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

### Return Value

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

### See Also

* struct [Point](../../point/)
* struct [Rectangle](../)
* namespace [Aspose.Imaging](../../rectangle/)
* assembly [Aspose.Imaging](../../../)


