Added support for top-left and bottom-left coordinate systems.