In games you had to do this 9 piece slice, one slice for each of the 4 corners, all 4 straight sides that can be repeated as a pattern and the middle background piece
Nine-patch image scaling[0] is still a thing, and is only orthogonally related to setting a border radius (it's a hell of lot more versatile than that).
0: https://docs.unity3d.com/Manual/9SliceSprites.html