This script lets you create overlay over any window you like and draw on it using pygame:
Initialize the overlay, and start the loop in which you draw like so:
overlay = Overlay(targetWindowTitle)
while overlay.window:
overlay.draw("fillRect", vector=Vector(30, 30, 60, 60), color=(255, 0, 255))
overlay.handle()
All uses and figures can be found in the script.