I like dops idea better. Much cleaner.
I’m not able to open your project right now but I’m assuming the canvas’ origin is centered. This will give an xy that can be directly used to draw to the canvas. No need to subtract the bboxtop and such.
Tx = (touch.x-canvas.x)*cos(-canvas.angle) - (touch.y-canvas.y)*sin(-canvas.angle) - canvas.width/2
Ty = (touch.x-canvas.x)*sin(-canvas.angle) + (touch.y-canvas.y)*cos(-canvas.angle) -canvas.height/2