Proof of concept for a simple (mathematical) collision detection for pen-drawn shapes, especially a rectangle with rounded corners.