I'm working on an HTML5 application which renders shapes on canvas. The shapes are drawn by the user, using free drawing.
I implemented zooming, thanks to this answer: https://stackoverflow.com/a/6776341/
However, once the canvas is zoomed, when user continues to draw, the lines appear with offset. The question is how to translate the points so the lines to be drawn under the cursor again?