Sure, calculating the coordinates is a bit of a hassle, but you can use code similar to those of my "Mouse editing" scripts that draw stuff around the selected events, such as Stretch/Compress or Arch/Tilt.
Here, for example, the Multi Tool script draws several rectangles to show "active zones" for different tools: