> For the complete documentation index, see [llms.txt](https://docs.flatredball.com/gum/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flatredball.com/gum/gum-tool/gum-elements/nineslice/custom-frame-texture-coordinate-width.md). Agents can also search and read this documentation through its [MCP server](https://docs.flatredball.com/gum/~gitbook/mcp).

# Custom Frame Texture Coordinate Width

## Introduction

The `Custom Frame Texture Coordinate Width` property allows a `NineSlice` to customize the number of pixels used on the source texture when defining its outer frame. This allows for fine control over which parts of a NineSlice stretch and which parts are used as the corners and edges.

By default this value is `null`, which means the `NineSlice` automatically dedicates 1/3 of the texture for the edges.

<figure><img src="https://2695663588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fzQmxQ1VeUFHcoo2c%2Fuploads%2Fgit-blob-ce10c2c08fba714d9bb22329db8f0c9160c43a3b%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

## Changing Custom Frame Texture Coordinate Width

If the `Custom Frame Texture Coordinate Width` value is changed, then the source texture applies a fixed pixel size to the borders. For example, using the image above, the frame can be changed to 3 so that only the black and white pixels are part of the border.

<figure><img src="https://2695663588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fzQmxQ1VeUFHcoo2c%2Fuploads%2Fgit-blob-ba0d88286860779dffa06c230b07fce59a531e86%2F16_06%2003%2033.png?alt=media" alt=""><figcaption><p>NineSlice with an explicitly-set 3 pixel border width</p></figcaption></figure>

### Custom Frame Texture Coordinate Width Set to 0

If `Custom Frame Texture Coordinate Width` is set to a value of 0, then the `NineSlice` does not draw a border. In other words, setting this value to 0 results in the `NineSlice` behaving like a `Sprite`.

<figure><img src="https://2695663588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fzQmxQ1VeUFHcoo2c%2Fuploads%2Fgit-blob-43018517fd5f771aee1436c39b440edd9432a8c6%2F21_07%2048%2058.gif?alt=media" alt=""><figcaption></figcaption></figure>

## Setting Each Side

The chain button next to `Custom Frame Texture Coordinate Width` breaks it apart into **T**, **L**, **R**, and **B** fields, arranged the way the sides sit on the NineSlice, the same as [Border Scale](https://docs.flatredball.com/gum/gum-tool/gum-elements/nineslice/border-scale.md). Each field is the number of pixels that side takes from the source texture, so art with a thick top and a thin bottom keeps both at their own size. A side left blank uses `Custom Frame Texture Coordinate Width`, or a third of the texture if that is blank too. Click the chain button again to return to one value, which clears every side.

The **Texture Coordinates** tab draws its guides at each side's cut.

<figure><img src="https://2695663588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fzQmxQ1VeUFHcoo2c%2Fuploads%2Fgit-blob-d1d6365e89a0cf7c8b3e9b2bb5c57f321b4001d6%2F22_06%2030%2001.png?alt=media" alt=""><figcaption><p>A panel with a 31 pixel header and 10 pixel sides</p></figcaption></figure>

<figure><img src="https://2695663588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fzQmxQ1VeUFHcoo2c%2Fuploads%2Fgit-blob-c76bcb778c628d92fd0a57e534e5480df622a64c%2F22_06%2030%2002.png?alt=media" alt=""><figcaption><p>Cut per side, the header keeps its height (left). With one width of 10 for every side, the header stretches (right).</p></figcaption></figure>

The chain button appears only in projects at [version 9](https://docs.flatredball.com/gum/gum-tool/upgrading/upgrading-file-gumx-version.md#version-9) or later. Older projects keep the single value.

{% hint style="info" %}
Available in December 2026, or now if building Gum from source.
{% 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flatredball.com/gum/gum-tool/gum-elements/nineslice/custom-frame-texture-coordinate-width.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
