> For the complete documentation index, see [llms.txt](https://novoline.gitbook.io/novoscript/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://novoline.gitbook.io/novoscript/api/utilities/render-utility.md).

# Render Utility

Utility used for rendering various objects on the screen - includes 2D and 3D rendering

## render\_util.drawRainbowBox

| Parameters      | Type    | Description                 |
| --------------- | ------- | --------------------------- |
| x               | double  | Top-Left Point of a box     |
| y               | double  | Bottom-Left Point of a box  |
| x2              | double  | Top-Right Point of a box    |
| y2              | double  | Bottom-Right point of a box |
| lineWidth       | float   | Width of the lines          |
| cornered        | boolean | Same for playerESP          |
| retardedRainbow | boolean | Asstolfo color              |
| bordered        | boolean | Black outline of the lines  |

```
render_util.drawRainbowBox(x,y,x2,y2,lineWidth,cornered,retardedRainbow,bordered)
```

## render\_util.drawBlockBox

| Parameters | Type    | Description  |
| ---------- | ------- | ------------ |
| x          | double  | X coordinate |
| y          | double  | Y coordinate |
| z          | double  | Z coordinate |
| color      | integer | color        |

```
render_util.drawBlockBox(x,y,z,color)
```

| Parameters | Type     | Description         |
| ---------- | -------- | ------------------- |
| pos        | BlockPos | The BlockPos object |
| color      | integer  | color               |

```
render_util.drawBlockBox(pos,color)
```

## render\_util.drawEntityOnScreen

| Parameters | Type             | Description                           |
| ---------- | ---------------- | ------------------------------------- |
| posX       | integer          | X position on the screen              |
| posY       | integer          | Y position on the screen              |
| scale      | float            | The scale of an entity being rendered |
| entity     | EntityLivingBase |                                       |

```
render_util.drawEntityOnScreen(posX,posY,scale,entity)
```

## render\_util.drawBorderedRectangle

| Parameters   | Type    | Description                                          |
| ------------ | ------- | ---------------------------------------------------- |
| x            | double  | Top-Left Point of a box                              |
| y            | double  | Bottom-Left Point of a box                           |
| x2           | double  | Top-Right Point of a box                             |
| y2           | double  | Bottom-Right point of a box                          |
| lineWidth    | float   | Width of the line                                    |
| colorOutline | integer | Color of the outline (border)                        |
| colorFill    | integer | Color which the rectangle is going to be filled with |

```
render_util.drawBorderedRectangle(x,y,x2,y2,lineWidth,colorOutline,colorFill)
```

## render\_util.drawRoundedRectangle

| Parameters | Type    | Description                |
| ---------- | ------- | -------------------------- |
| x          | float   | Top-Left Point of a box    |
| y          | float   | Bottom-Left Point of a box |
| width      | float   |                            |
| height     | float   |                            |
| smoothness | float   | Roundness of the rectangle |
| color      | integer |                            |

```
render_util.drawRoundedRectangle(x,y,width,height,smoothness,color)
```

## render\_util.drawFilledRectangle

| Parameters | Type    | Description                 |
| ---------- | ------- | --------------------------- |
| x          | double  | Top-Left Point of a box     |
| y          | double  | Bottom-Left Point of a box  |
| x2         | double  | Top-Right Point of a box    |
| y2         | double  | Bottom-Right point of a box |
| color      | integer |                             |

```
render_util.drawFilledRectangle(x,y,x2,y2,color)
```

## render\_util.drawCircle

| Parameters | Type    | Description                   |
| ---------- | ------- | ----------------------------- |
| x          | float   | Top-Left Point of a circle    |
| y          | float   | Bottom-Left Point of a circle |
| radius     | float   | Radius of a circle            |
| color      | integer |                               |

```
render_util.drawCircle(x,y,radius,color)
```

## render\_util.getRenderPosX

Returns the render pos X

```
render_util.getRenderPosX() - double
```

## render\_util.getRenderPosY

Returns the render posY

```
render_util.getRenderPosY() - double
```

## render\_util.getRenderPosZ

Returns the render pos Z

```
render_util.getRenderPosZ() - double
```

## render\_util.worldToScreen

Returns the screen position of the desired coordinates

| Parameter        | Type            | Description       |
| ---------------- | --------------- | ----------------- |
| scaledresolution | ScaledResoltion | Scaled Resolution |
| x                | double          | X position        |
| y                | double          | Y position        |
| z                | double          | Z position        |

```
render_util.worldToScreen(scaledresolution,x,y,z) - Vector3d
```

## render\_util.renderString

| Parameter  | Type    | Description                                   |
| ---------- | ------- | --------------------------------------------- |
| text       | String  | The text                                      |
| x          | float   | X position                                    |
| y          | float   | Y position                                    |
| color      | int     | Color of a string                             |
| dropShadow | boolean | Is there going to be a shadow behind the text |

```
render_util.renderString(text,x,y,color,dropShadow)
```
