# Renderer

### Static Functions:

#### .GetScreenSize

`Renderer.GetScreenSize()`: Vector2

Returns Vector2 object with screen size.

### Functions:

#### .SetRounding

`Renderer.SetRounding(value: integer, tl: boolean, tr: boolean, bl: boolean, br: boolean)`

| Argument | Type    | Description           |
| -------- | ------- | --------------------- |
| value    | integer | Rounding value        |
| tl       | boolean | Top-Left rounding     |
| tr       | boolean | Top-Right rounding    |
| bl       | boolean | Bottom-Left rounding  |
| br       | boolean | Bottom-Right rounding |

Sets rounding flags for current frame.

#### .SetThickness

`Renderer.SetThickness(value: integer)`

| Argument | Type    | Description     |
| -------- | ------- | --------------- |
| value    | integer | Thickness value |

Sets thickness value for current frame.

#### .SetTextAlign

`Renderer.SetTextAlign(value: integer)`

| Argument | Type    | Description                                               |
| -------- | ------- | --------------------------------------------------------- |
| value    | integer | <p>Align type:<br>0 - Left<br>1 - Center<br>2 - Right</p> |

Sets text align for current frame.

#### .AddLine

`Renderer.AddLine(from: Vector2, to: Vector2, color: Color)`

| Argument | Type    | Description                  |
| -------- | ------- | ---------------------------- |
| from     | Vector2 | Screen coordinate of point A |
| to       | Vector2 | Screen coordinate of point B |
| color    | Color   | Color object                 |

Draws a line from point A to point B.

#### .AddRect

`Renderer.AddRect(from: Vector2, to: Vector2, color: Color)`

| Argument | Type    | Description                  |
| -------- | ------- | ---------------------------- |
| from     | Vector2 | Screen coordinate of point A |
| to       | Vector2 | Screen coordinate of point B |
| color    | Color   | Color object                 |

Draws a rect from point A to point B.

#### .AddRectFilled

`Renderer.AddRectFilled(from: Vector2, to: Vector2, color: Color)`

| Argument | Type    | Description                  |
| -------- | ------- | ---------------------------- |
| from     | Vector2 | Screen coordinate of point A |
| to       | Vector2 | Screen coordinate of point B |
| color    | Color   | Color object                 |

Draws a filled rect from point A to point B.

#### .AddImage

`Renderer.AddImage(image: Image, position: Vector2, size: Vector2, color: Color)`

| Argument | Type               | Description       |
| -------- | ------------------ | ----------------- |
| image    | Image              | Image object      |
| position | Vector2            | Screen coordinate |
| size     | Vector2 (optional) | Image Size        |
| color    | Color (optional)   | Color object      |

Draws a image.

#### .AddText

`Renderer.AddText(font: Font, position: Vector2, color: Color, text: string)`

| Argument | Type    | Description             |
| -------- | ------- | ----------------------- |
| font     | Font    | Font object             |
| position | Vector2 | Screen coordinate       |
| color    | Color   | Color object            |
| text     | string  | Text that will be drawn |

Draws a text.

#### .AddTextShadow

`Renderer.AddTextShadow(font: Font, position: Vector2, color: Color, text: string)`

| Argument | Type    | Description             |
| -------- | ------- | ----------------------- |
| font     | Font    | Font object             |
| position | Vector2 | Screen coordinate       |
| color    | Color   | Color object            |
| text     | string  | Text that will be drawn |

Draws a text with shadow.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sneakyevil.gitbook.io/sleeping-dogs-de-script-api/classes/renderer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
