This would be possible with the getBoxQuads API, I've workin on a polyfill for it: https://github.com/jogibear9988/getBoxQuadsPolyfill