maped: support inverted rectangles