# DrawRect

## Syntax

<pre class="language-lua"><code class="lang-lua"><strong>Susano.DrawRect(x, y, w, h, r, g, b[, a], thickness) -> void
</strong></code></pre>

## Parameters

{% hint style="info" %}
`x, y` (number): Top-left corner in pixels.

`w, h` (number): Width and height in pixels.

`r, g, b` (number): Color in \[0..1].

`a` (number, optional): Alpha in \[0..1]. Default: `1.0`.

`thickness` (number): Border thickness in pixels.
{% endhint %}

## Return(s)

{% hint style="info" %}
None
{% endhint %}

## Behavior

{% hint style="info" %}
Appends a rectangle outline to the build buffer.

Visible after `Susano.SubmitFrame()`. Persists until next submit.
{% endhint %}

## Example(s)

```lua
Susano.BeginFrame()
Susano.DrawRect(320,100, 120,80, 0,1,0, 1, 1.5)
Susano.SubmitFrame()
```


---

# 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/drawrect.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.
