implement creating variable sized textures from nine-patches