# RectangleRuntime

The RectangleRuntime object can be used to draw a single-pixel-wide rectangle. It can either have a solid outline or dotted, and can display any color. RectangleRuntimes only draw outlines. For filled rectangles see the [ColoredRectangleRuntime](/gum/code/standard-visuals/coloredrectangleruntime.md) type.

### Code Example

The following code creates a RectangleRuntime:

```csharp
// Initialize
var lineRectangle = new RectangleRuntime();
lineRectangle.Width = 120;
lineRectangle.Height = 24;
lineRectangle.Color = Color.Pink;  // This is a Microsoft.Xna.Framework.Color
container.Children.Add(lineRectangle);
```

<figure><img src="/files/AR5JS21BYQPNk7bUmSlu" alt=""><figcaption><p>RectangleRuntime instantiated in code</p></figcaption></figure>


---

# 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.flatredball.com/gum/code/standard-visuals/rectangleruntime.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.
