When resizing an ROI, width and height are prevented from going below a minimum, which evades the issues with the resizing algorithm on negative coordinates. Added a comment indicating the vertex ordering the hacks depend on, using ASCII art.