All measurements are in pixels, with the origin at the lower-left corner of the figure window.
The mouse button must be down when rbbox is called. The corner of the rectangle closest to the xy point follows the cursor when the user drags the mouse. The function returns when the mouse button is released. To determine the extent of the rectangle, use the figure's CurrentPoint property. In this case, rect defines the initial rectangle which the user must resize, and xy corresponds to one of the corners of the rectangle.