Skip to content
Search/
Home › Glossary › Game assets

What is 9-slice (nine-patch) scaling?

Game assets glossary · 2 primary sources

A way to stretch a UI panel or button to any size by cutting it into 9 parts: the corners never scale, the edges stretch in one direction and the centre fills the rest.

You set four margins (left, top, right, bottom) that mark the corners. The result keeps crisp borders at any size, so one small image serves every dialog box. Godot uses NinePatchRect or a StyleBoxTexture with texture margins; Unity sets the border in the Sprite Editor and uses an Image of type Sliced.

For pixel art, keep the stretch mode on tile rather than stretch if the edge has a pattern, and keep the panel size a multiple of the pattern.

Sources

Related terms

On this site

All game assets terms · Full glossary

Free: the Free API Starter Kit

Copy-paste calls for 4 APIs with free daily tiers (CVE priority, VIN recalls, US duty rates, email checks), then 5 short emails on KEV/EPSS, MCP and free data.

You get one email to confirm first. Then the kit, and 5 short emails over two weeks. One-click unsubscribe in every email; we never share your address.