Thank you for sharing this! I think it is a very cool trick. Unfortunately it didn't work for me. Seems like whether path is closed or not is not persisted during `ctx.save()` operation: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRende...
Which causes the bottom closing line to appear where it shouldn't. Here is a simple jsbin to reproduce: https://jsbin.com/luzatuteha/1/edit?html,js,output