# Drawing Functions

- [SetAutoFrame](https://docs.susano.re/api-reference/drawing-functions/setautoframe.md): Enable or disable auto-frame mode for the current coroutine.
- [WithFrame](https://docs.susano.re/api-reference/drawing-functions/withframe.md): Execute a callback between BeginFrame and SubmitFrame automatically.
- [PushClipRect](https://docs.susano.re/api-reference/drawing-functions/pushcliprect.md): Push a clipping rectangle onto the draw clip stack.
- [PopClipRect](https://docs.susano.re/api-reference/drawing-functions/popcliprect.md): Pop the last clipping rectangle from the draw clip stack.
- [WithClipRect](https://docs.susano.re/api-reference/drawing-functions/withcliprect.md): Execute a callback with a temporary clipping rectangle.
- [DrawTextCentered](https://docs.susano.re/api-reference/drawing-functions/drawtextcentered.md): Draw text horizontally centered at a given X position.
- [DrawTextOutlined](https://docs.susano.re/api-reference/drawing-functions/drawtextoutlined.md): Draw text with a 1px outline for readability on any background.
- [DrawRoundedRect](https://docs.susano.re/api-reference/drawing-functions/drawroundedrect.md): Draw a rounded rectangle outline with rounding as a required parameter.
- [DrawRoundedRectFilled](https://docs.susano.re/api-reference/drawing-functions/drawroundedrectfilled.md): Draw a filled rounded rectangle with rounding as a required parameter.
- [DrawShadowRect](https://docs.susano.re/api-reference/drawing-functions/drawshadowrect.md): Draw a filled rectangle with an automatic drop shadow.
- [DrawBorderRect](https://docs.susano.re/api-reference/drawing-functions/drawborderrect.md): Draw a filled rectangle with a colored border in a single call.
- [BeginFrame](https://docs.susano.re/api-reference/drawing-functions/beginframe.md): Start a new Lua render frame. Clears the build buffer for this tick.
- [SubmitFrame](https://docs.susano.re/api-reference/drawing-functions/submitframe.md): Publish the current build buffer as the active frame to render on the Overlay.
- [ResetFrame](https://docs.susano.re/api-reference/drawing-functions/resetframe.md): Clear all queued and displayed draw commands for the current Lua coroutine. Empties both build and render buffers and cancels any pending swap.
- [ResetAllFrames](https://docs.susano.re/api-reference/drawing-functions/resetallframes.md): Clear every coroutine’s build and render buffers. Removes all layers.
- [DrawLine](https://docs.susano.re/api-reference/drawing-functions/drawline.md): Enqueue a line in the current build buffer.
- [DrawRect](https://docs.susano.re/api-reference/drawing-functions/drawrect.md): Draw a rectangle outline with optional rounding.
- [DrawRectFilled](https://docs.susano.re/api-reference/drawing-functions/drawrectfilled.md): Draw a filled rectangle with optional rounding.
- [DrawRectGradient](https://docs.susano.re/api-reference/drawing-functions/drawrectgradient.md): Enqueue a filled rectangle with gradient in the current build buffer.
- [DrawCircle](https://docs.susano.re/api-reference/drawing-functions/drawcircle.md): Enqueue a circle (filled or outline) in the current build buffer.
- [DrawText](https://docs.susano.re/api-reference/drawing-functions/drawtext.md): Draw text at a given position with optional font.
- [GetTextWidth](https://docs.susano.re/api-reference/drawing-functions/gettextwidth.md): Measure the pixel width of a text string at a given font size.
- [WorldToScreen](https://docs.susano.re/api-reference/drawing-functions/worldtoscreen.md): Project a 3D world position to 2D screen space.
- [LoadFont](https://docs.susano.re/api-reference/drawing-functions/loadfont.md): Load a TTF/OTF font into ImGui and return its handle.
- [LoadFontFromBuffer](https://docs.susano.re/api-reference/drawing-functions/loadfontfrombuffer.md): Load a TTF/OTF font into ImGui and return its handle.
- [PushFont](https://docs.susano.re/api-reference/drawing-functions/pushfont.md): Make a previously loaded font the current font for this coroutine.
- [PopFont](https://docs.susano.re/api-reference/drawing-functions/popfont.md): Restore the previous font for this coroutine.
- [LoadTexture](https://docs.susano.re/api-reference/drawing-functions/loadtexture.md): Load an image file into a DX11 texture.
- [LoadTextureFromBuffer](https://docs.susano.re/api-reference/drawing-functions/loadtexturefrombuffer.md): Load a texture from raw image bytes.
- [ReleaseTexture](https://docs.susano.re/api-reference/drawing-functions/releasetexture.md): Free a previously loaded texture.
- [DrawImage](https://docs.susano.re/api-reference/drawing-functions/drawimage.md): Draw a texture on screen with optional tint, rounding, and UVs.


---

# 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://docs.susano.re/api-reference/drawing-functions.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.
