var ms = 200; //放大镜的半径。将offcanvas画到用户可见的canvas中 var sx = imageLg_cx - mc; var sy = imageLg_cy - ms; var dx = point.x - ms; var dy = point.y - ms; context.drawImage(offcanvas, sx, sy, 2 * ms, 2 * ms, dx, dy, 2 * ms, 2 * ms); 为什么sx, sy 和 dx, dy, 要这样计算呢