Usage
9-patch borders are set per sprite via the project file. There is no CLI flag.Project file configuration
Add a[[sprite_overrides]] entry for each sprite that needs 9-patch metadata:
Border values are in source pixels before any scale variant is applied. When a scale variant is used, FastPack scales the border values proportionally in that variant’s data file.
Example output
Aui/button sprite with nine_patch = { top=8, right=8, bottom=8, left=8 }:
JSON Hash output:
The
ninePatch field is omitted for sprites that have no override.Technical details
Field naming convention
Field naming convention
ninePatch is written in camelCase in the JSON output, consistent with the other camelCase fields (spriteSourceSize, sourceSize).Scale variants
Scale variants
Border values in the data file are in the variant’s pixel space. A
@0.5x scale variant writes borders that are half the project-file values.