> For the complete documentation index, see [llms.txt](https://docs.autowall.fun/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.autowall.fun/documentation/vars/render.md).

# Render

## <i class="fa-square-web-awesome">:square-web-awesome:</i> Render

Everything here draws into a full-screen, input-transparent ImGui window (`##lua_overlay`) rebuilt every frame right before `events.render` fires for every running script — the same drawing mechanism the cheat's own menu uses, so it always renders on top of the game regardless of whether the menu itself is open.

### Screen size

```lua
local w, h = render.screen_size()
```

### Text

```lua
render.text(font, pos, color, text, align?)
```

* `font`: string. Resolved in this order: `"verdana"`/`"verdana_bold"` → the ESP verdana font, `"smallest"` → ESP pixel font, `"iosevka"`/`"weapons"` → their ESP fonts, anything else → looked up by name in the app's font registry (`"primary"`, `"icons"`), falling back to whatever ImGui's current font is if nothing matches. There's no true bold variant yet — `"verdana_bold"` currently renders the same as `"verdana"`.
* `pos`: `{x, y}` or `{x=, y=}`.
* `color`: see Color.
* `align`: `"l"` (default), `"c"`, or `"r"`.

```lua
render.text_size(font, text)   -- w, h
```

### Geometry

```lua
render.line(p1, p2, color, thickness?)                       -- thickness default 1
render.rect_filled(p1, p2, color, rounding?)                  -- rounding default 0
render.rect_outline(p1, p2, color, thickness?, rounding?)     -- thickness default 1, rounding default 0
render.circle(center, radius, color, segments?, thickness?)   -- segments 0 = auto, thickness default 1
render.circle_filled(center, radius, color, segments?)
```

All positions accept `{x, y}` or `{x=, y=}`; all colors accept either a `color()` object or a `{r,g,b,a}` 0..1 table.

### World to screen

```lua
local x, y, ok = render.world_to_screen(world_x, world_y, world_z)
```

{% hint style="warning" %}
Uses the same projection the ESP box/skeleton renderer uses (`math::world_to_screen`). `ok` is `false` when the point is behind the camera / off-screen — don't draw if it's false, `x`/`y` are meaningless in that case.
{% endhint %}

```lua
events.render:set(function()
    local player = entity.get_local_player()
    if not player then return end

    local origin = entity.get_origin(player)
    local sx, sy, ok = render.world_to_screen(origin.x, origin.y, origin.z)
    if ok then
        render.circle_filled({sx, sy}, 5, color(0, 255, 0))
    end
end)
```

### Not implemented yet

{% hint style="danger" %}
`render.triangle`/`triangle_filled`, `render.polygon`, `render.gradient`, `render.blur`/`blur_circle_3d`, `render.push_clip_rect`/`pop_clip_rect`, `render.text_rich`/`text_rich_size`, and all texture/image/GIF functions (`load_image`, `load_svg`, `load_image_file`, `image`, `image_uv`, `gif`) from the original spec are **not implemented**. Calling them raises "attempt to call a nil value" — see Roadmap.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.autowall.fun/documentation/vars/render.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
