Mac trackpad can be used similar to a pen tablet in the built-in "handwriting" input sources. But to use it outside the input source is not easy (See MacBook Trackpad Drawing).
There are software like inklet and its alternatives allowing us to achieve the goal but I tried inklet and it's not working well.
I want to write something in swift to achieve something like this
It should:
map a selected part of the touch pad to a dynamically selected part of o the screen
export to svg / png
Maybe: some gestures
Maybe: auto correction of simple shapes like built in note
It should: