How to use Scale9 sprite? #2356
-
Beta Was this translation helpful? Give feedback.
Answered by
rh101
Jan 30, 2025
Replies: 2 comments 8 replies
-
You need set the cap insets, which seem to be missing from the code in your post. For example:
|
Beta Was this translation helpful? Give feedback.
3 replies
-
Hi, I solved using this tool: From site: But something that i learn after test more than 20 sprites, is that sprites need be ready for scale, like this that i buy: ![]() |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can only set the left, right, top and bottom values, so based on this image:
These are the corresponding settings:
Also, in order for the sprite to render the corners correctly, the final content size must be greater than the size of the total X and total Y inset sizes combined.
So, minimum content size is:
balloon->setContentSize(L+R, T+B)
So, for your example,: