To make scalable square with rounded corners need to cut square into several pieces: 1)left-top corner 2)right-top corner 3)left-bottom corner 4)right-bottom corner 5)top line 6)bottom line 7)left line 8)right line 9)middle part
Parts from 5 to 9 scaled.