So I wanted to draw rectangles on canvas based on coordinates received from an external system, which uses (x1,y1) (top-left) and (x2,y2) (bottom-right) coordinates to draw