add_slice
Add a named rectangular region to a sprite, with optional 9-patch center, pivot point, color, and user data for organizing sprite slices.
Instructions
Create a slice (named region) at (x, y, width, height).
Args:
center_*: Optional 9-patch center rectangle, **relative to the slice's
top-left**. Provide all four to mark the stretchable middle.
pivot_*: Optional pivot point (relative to the slice).
color: Optional slice colour shown in the editor.
data: Optional user data string.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| data | No | ||
| name | Yes | ||
| color | No | ||
| width | Yes | ||
| height | Yes | ||
| pivot_x | No | ||
| pivot_y | No | ||
| center_x | No | ||
| center_y | No | ||
| filename | Yes | ||
| center_width | No | ||
| center_height | No |