Convert client coords to canvas CSS-pixel coords (relative to the canvas's
top-left). Apps drawing in CSS-pixel space feed the result directly into
world math when pan/zoom is identity. With pan/zoom, compose this with
your inverse-viewport transform.
Convert client coords to canvas CSS-pixel coords (relative to the canvas's top-left). Apps drawing in CSS-pixel space feed the result directly into world math when pan/zoom is identity. With pan/zoom, compose this with your inverse-viewport transform.