# Quadrilateral

The `Quadrilateral` class represents a quadrilateral shape in 2D space. It contains an array of four Point objects, which represent the vertices of the quadrilateral.

## Definition

*Module:* core

```python
class Quadrilateral 
```

## Properties
  
| Property  | Type | Description |
|---------- | ---- |-------------|
| `points` | *List\[[Point](https://www.dynamsoft.com/capture-vision/docs/server/programming/python/api-reference/core/basic-classes/point.md)\]* | A Point list of length 4 that define the quadrilateral. |
| [`id`](#id) | *int* | The ID of the quadrilateral. |

## Methods

| Method               | Description |
|----------------------|-------------|
| [`__init__`](#__init__) | Initializes a new instance of the `Quadrilateral` class with default values. |
| [`contains`](#this) | Determines whether a point is inside the quadrilateral |
| [`get_area`](#this) | Gets the area of the quadrilateral. |
| [`get_bounding_rect`](#get_bounding_rect) | Gets the bounding rectangle of the quadrilateral. |


### \_\_init\_\_

Initializes a new instance of the `Quadrilateral` class with default values.

```python
def __init__(self):
```

### contains

Determines whether a point is inside the quadrilateral.

```python
def contains(self, point: "Point") -> bool:
```

**Parameters**

`point` The point to test.

**Return Value**

Returns true if the point inside the quadrilateral, false otherwise.

**See Also**

[Point](https://www.dynamsoft.com/capture-vision/docs/server/programming/python/api-reference/core/basic-classes/point.md)

### get_area

Gets the area of the quadrilateral.

```python
def get_area(self) -> int:
```

**Return Value**

RReturns the area of the quadrilateral.

### get_bounding_rect

Gets the bounding rectangle of the quadrilateral.

```python
def get_bounding_rect(self) -> Rect:
```

**Return Value**

Returns bounding rectangle of the quadrilateral, in type of [`Rect`](https://www.dynamsoft.com/capture-vision/docs/server/programming/python/api-reference/core/basic-classes/rect.md).

