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

# Render

### Box\_Outline / OUTDATED

`MTools.Render.Box_Outline(vectors, colors, roundings);`

| Name      | Type    | Description                       |
| --------- | ------- | --------------------------------- |
| vectors   | `table` | Two vectors for the position.     |
| colors    | `table` | Four colors for gradients.        |
| roundings | `table` | Four boolean values for rounding. |

**Allows you to make an outline with different colors and roundings.**\
\ <mark style="color:red;">**! WARNING !**</mark>\ <mark style="color:red;">**This method may be disabled soon due to obsolescence.**</mark>\ <mark style="color:red;">**New method:**</mark> [*<mark style="color:blue;">**#modern-box**</mark>*](https://monytools.gitbook.io/type/render#modern-box)\
\ <mark style="color:green;">**Example usage:**</mark>

```lua
-- Needs events.render.
MTools.Render.Box_Outline(
    { 
        vector(500, 500), vector(650, 520)
    },
    {
        color(250, 250, 250, 250), color(250, 250, 250, 250), 
        color(250, 250, 250, 250), color(250, 250, 250, 250), 
    },
    {
        false, false,
        true, true,
    }
);
-- Draws a box outline with two non-rounded corners at the top and two rounded corners at the bottom, in white.
```

### Box\_Outline\_Glow

`MTools.Render.Box_Outline_Glow(vectors, clr, thickness, rounding);`

| Name      | Type     | Description                   |
| --------- | -------- | ----------------------------- |
| vectors   | `table`  | Two vectors for the position. |
| clr       | `color`  | Color for glow.               |
| thickness | `number` | Amount of glow.               |
| rounding  | `number` | The rounding of the glow.     |

**Allows you to make a nice glow + rounded.**\
\ <mark style="color:green;">**Example usage:**</mark>

```lua
-- Needs events.render.
MTools.Render.Box_Outline_Glow(
    { 
        vector(500, 500), vector(650, 520)
    },
    color(250, 250, 250, 250),
    65,
    7.5
);
-- Draws a nice glow with 7.5 pixels of rounding.
```

### Histogram

`MTools.Render.Histogram(vectors, clr, steps, round);`

| Name     | Type            | Description                                                   |
| -------- | --------------- | ------------------------------------------------------------- |
| vectors  | `table`         | Two vectors, first position second size.                      |
| clr      | `table / color` | Color for the pattern. Specifying in the array will be color. |
| steps    | `table`         | Unlimited number of dots as numbers.                          |
| rounding | `number`        | Rounding out the posts.                                       |

**Allows you to create a histogram.**\
\ <mark style="color:green;">**Example usage:**</mark>

```lua
-- Needs events.render.
MTools.Render.Histogram(
    { 
        vector(500, 500), 
        vector(80, 80) 
    }, 
    color(255, 255, 255, 255),
    { 1, 6, 7, 3, 1, 9, 2, 7 }
);
-- Create a Histogram with one color from points 1 6 7 3 1 9 2 7.
MTools.Render.Histogram(
    { 
        vector(590, 500), 
        vector(80, 80) 
    }, 
    {
        color(0, 255, 255, 255),
        color(255, 0, 255, 255),
        color(255, 255, 0, 255),
    },
    { 1, 6, 7, 3, 1, 9, 2, 7 }
);
-- Creates a Histogram with three repeating colors from points 1 6 7 3 1 9 2 7.
```

### Graphic

`MTools.Render.Graphic(vectors, clr, steps);`

| Name    | Type            | Description                                                   |
| ------- | --------------- | ------------------------------------------------------------- |
| vectors | `table`         | Two vectors, first position second size.                      |
| clr     | `table / color` | Color for the pattern. Specifying in the array will be color. |
| steps   | `table`         | Unlimited number of dots as numbers.                          |

**Allows you to create a Graphic.**\
\ <mark style="color:green;">**Example usage:**</mark>

```lua
-- Needs events.render.
MTools.Render.Graphic(
    { 
        vector(500, 500), 
        vector(80, 80) 
    }, 
    color(255, 255, 255, 255),
    { 1, 6, 7, 3, 1, 9, 2, 7 }
);
-- Create a Graphic with one color from points 1 6 7 3 1 9 2 7.
MTools.Render.Graphic(
    { 
        vector(590, 500), 
        vector(80, 80) 
    }, 
    {
        color(0, 255, 255, 255),
        color(255, 0, 255, 255),
        color(255, 255, 0, 255),
    },
    { 1, 6, 7, 3, 1, 9, 2, 7 }
);
-- Creates a Graphic with three repeating colors from points 1 6 7 3 1 9 2 7.
```

### Modern / Box

`MTools.Modern.Box(vectors, rounding, color);`

| Name     | Type    | Description                       |
| -------- | ------- | --------------------------------- |
| vectors  | `table` | Two vectors for the position.     |
| rounding | `table` | Four numeric values for rounding. |
| color    | `color` | Box color.                        |

**Allows you to create a box with different rounded edges.**\
\ <mark style="color:green;">**Example usage:**</mark>

```lua
-- Needs events.render.
MTools.Render.Modern.Box(
    { 
        vector(500, 500), vector(650, 520)
    },
    {
        0, 3, 
        6, 9, 
    },
    color(15, 15, 15, 127)
);
-- Draws a box with rounded 0, 3, 6, 9 black with half transparency.
```

### **Modern / Box\_outline**

`MTools.Modern.Box_Outline(vectors, rounding, color, thickness);`

| Name      | Type     | Description                       |
| --------- | -------- | --------------------------------- |
| vectors   | `table`  | Two vectors for the position.     |
| rounding  | `table`  | Four numeric values for rounding. |
| color     | `color`  | Outline color.                    |
| thickness | `number` | Outline thickness.                |

**Allows you to create an outline with different rounded edges.**\
\ <mark style="color:green;">**Example usage:**</mark>

```lua
-- Needs events.render.
MTools.Render.Modern.Box_Outline(
    { 
        vector(500, 500), vector(650, 520)
    },
    {
        0, 3, 
        6, 9, 
    },
    color(255, 255, 2555, 255),
    1.25
);
-- Draws an outline with rounded 0, 3, 6, 9 white.
```


---

# 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:

```
GET https://monytools.gitbook.io/type/render.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.
