Problems with NinePatchRect shrinking

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By qq715152910

Problems with NinePatchRect shrinking,Whether the algorithm is wrong?

Test:

1.Use a 640x479 resolution picture, set the corner borders, and set the stretch to on.
2.Set rect_size to greater than 640x479, the corners and borders are normal.
3. Set rect_size to less than 640x479, the corners and border cannot maintain the original size,and the pixels are completely distorted.
Cocos and Unity will not have such a similar problem.

Error:
Set rect_size <640x479,
When reduced to 363x455, the corners and border cannot maintain the original size, and the pixels are completely distorted.

Demo:
Demo-Download

Bottleneck:
This will cause confusion for some 2D developers. If the picture is reduced from the original size to the specified size and the corners and borders remain the same, this is definitely a bottleneck for now.

Suggest:
Add an Option to the Control-> NinePatchRect property menu to let developers freely choose whether it is turned on to reduce the size and keep the corner borders unchanged. At present, this will be the demand of many 2D developers.