javascriptjquerycanvaspenwacom

using a tablet to draw on a canvas (IE11, javascript/jquery)


The tablet we have is this:

enter image description here

I have a small canvas in a web page (around 790x480) and when using the pen the area of the tablet that matches the canvas it's too small. This happens because the tablet area matches the full resolution of the screen, while my small canvas is just part of the screen.

enter image description here

How can I "caputure" the pen inside the canvas while leaving the mouse "free"?


Solution

  • I found out that the software that comes with the tablet allows you to map the area where the pen should draw, so simply set that to match the area of the canvas and you're done.