MCPcopy
hub / github.com/methodofaction/Method-Draw / screenToPt

Function screenToPt

src/js/svgcanvas.js:3590–3606  ·  view source on GitHub ↗
(x_in, y_in)

Source from the content-addressed store, hash-verified

3588 }
3589
3590 function screenToPt(x_in, y_in) {
3591 var out = {
3592 x: x_in,
3593 y: y_in
3594 }
3595
3596 out.x /= current_zoom;
3597 out.y /= current_zoom;
3598
3599 if(matrix) {
3600 var pt = transformPoint(out.x, out.y, matrix.inverse());
3601 out.x = pt.x;
3602 out.y = pt.y;
3603 }
3604
3605 return out;
3606 }
3607
3608 function ptToScreen(x_in, y_in) {
3609 var out = {

Callers 2

selectWordFunction · 0.85
svgcanvas.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected