Tested rect -> path code