If the author and others haven't seen "BetterTouchTool" for Mac, there might be some useful code or inspiration to come from it.
It has a "multitouch live view" debug window that displays exact pixel touch locations and shapes.
The homepage showing this (third screenshot) is here: https://blog.boastr.net/