capInsets are relative to the texture you are using.
Let’s say I want this above image to be Scale9, to where I can have it in any size/aspect ratio…
The reason I would choose to do that, is that I would want to preserve the outer border to not stretch/distort… If I
node->setScale(4,1); on that as a regular Sprite, the border on top and sides will not be uniform in width, they would be stretched, and the node would not have the visual I am shooting for that Scale9 can provide.
In that case, if this texture for example is 100x100, and the border is 2px wide, my capInsets would be something like
Then if I set the Scale9 Size to be, say, 450x200, the inner part would scale uniformly, but the outer perimeter would keep its 2px width.
If I did a
capInsets of greater than the original 100x100 texture, I would get the same error you posted above, as the texture does not extend that far.
Hope that clears some of it up… for one last visual, this is what you try to accomplish with Scale9: