# Drawing

## Drawing.new

```lua
<DrawingObject> Drawing.new(<string> type)
```

Create a new drawing object of the specified type.

<details>

<summary>Objects</summary>

## DrawingObject

### BaseDrawingObject

| Property     | Type     |
| ------------ | -------- |
| Visible      | boolean  |
| ZIndex       | number   |
| Transparency | number   |
| Color        | Color3   |
| Destroy      | function |

### Line

| Property  | Type    |
| --------- | ------- |
| From      | Vector2 |
| To        | Vector2 |
| Thickness | number  |

### Text

| Property     | Type    |
| ------------ | ------- |
| Text         | string  |
| TextBounds   | Vector2 |
| Font         | number  |
| Size         | number  |
| Position     | Vector2 |
| Center       | boolean |
| Outline      | boolean |
| OutlineColor | Color3  |

### Image

| Property | Type    |
| -------- | ------- |
| Data     | string  |
| Size     | Vector2 |
| Position | Vector2 |
| Rounding | number  |

### Circle

| Property  | Type    |
| --------- | ------- |
| NumSides  | number  |
| Radius    | number  |
| Position  | Vector2 |
| Thickness | number  |
| Filled    | boolean |

### Square

| Property  | Type    |
| --------- | ------- |
| Size      | Vector2 |
| Position  | Vector2 |
| Thickness | number  |
| Filled    | boolean |

### Quad

| Property  | Type    |
| --------- | ------- |
| PointA    | Vector2 |
| PointB    | Vector2 |
| PointC    | Vector2 |
| PointD    | Vector2 |
| Thickness | number  |
| Filled    | boolean |

### Triangle

| Property  | Type    |
| --------- | ------- |
| PointA    | Vector2 |
| PointB    | Vector2 |
| PointC    | Vector2 |
| Thickness | number  |
| Filled    | boolean |

</details>

***

## Drawing.Fonts

| Index     | Value |
| --------- | ----- |
| UI        | 0     |
| System    | 1     |
| Plex      | 2     |
| Monospace | 3     |

***

## cleardrawcache

```lua
<nil> cleardrawcache()
```

Destroys every drawing object in the cache. Invalidates references to the drawing objects.

***

## getrenderproperty

```lua
<any> getrenderproperty(<DrawingObject> drawing, <string> property)
```

Gets the value of a property of a drawing. Functionally identical to `drawing[property]`.

***

## isrenderobj

```lua
<boolean> isrenderobj(<any> object)
```

Returns whether the given object is a valid Drawing.

***

## setrenderproperty

```lua
<nil> setrenderproperty(<DrawingObject> drawing, <string> property, <any> value)
```

Sets the value of a property of a drawing. Functionally identical to `drawing[property] = value`.

***
