issue #5685: refactor scale9sprite to support extend