Lines Matching full:unit
248 function drawPoint(px, py, xoffset, yoffset, unit) {
250 var _px = px * unit + xoffset;
251 var _py = py * unit + yoffset;
259 function drawTPt(scan, cIdx, tIdx, xoffset, yoffset, unit) {
270 drawPoint(x, y, xoffset, yoffset, unit);
279 var unit = scale * ticks;
297 var xoffset = xStart * -unit + at_x;
298 var yoffset = yStart * -unit + at_y;
304 ctx.fillText(num.toFixed(decimal_places), xoffset + num * unit - 5, 10);
309 ctx.fillText(num.toFixed(decimal_places), 0, yoffset + num * unit + 0);
322 ctx.moveTo(xoffset + scan[DELTA_C1_X1] * unit, yoffset + scan[DELTA_C1_Y1] * unit);
324 xoffset + scan[DELTA_C1_X2] * unit, yoffset + scan[DELTA_C1_Y2] * unit,
325 xoffset + scan[DELTA_C1_X3] * unit, yoffset + scan[DELTA_C1_Y3] * unit,
326 xoffset + scan[DELTA_C1_X4] * unit, yoffset + scan[DELTA_C1_Y4] * unit);
330 ctx.moveTo(xoffset + scan[DELTA_C2_X1] * unit, yoffset + scan[DELTA_C2_Y1] * unit);
332 xoffset + scan[DELTA_C2_X2] * unit, yoffset + scan[DELTA_C2_Y2] * unit,
333 xoffset + scan[DELTA_C2_X3] * unit, yoffset + scan[DELTA_C2_Y3] * unit,
334 xoffset + scan[DELTA_C2_X4] * unit, yoffset + scan[DELTA_C2_Y4] * unit);
340 ctx.moveTo(xoffset + scan[DELTA_C1_X1] * unit, yoffset + scan[DELTA_C1_Y1] * unit);
341 ctx.lineTo(xoffset + scan[DELTA_C1_X2] * unit, yoffset + scan[DELTA_C1_Y2] * unit);
342 ctx.lineTo(xoffset + scan[DELTA_C1_X3] * unit, yoffset + scan[DELTA_C1_Y3] * unit);
343 ctx.lineTo(xoffset + scan[DELTA_C1_X4] * unit, yoffset + scan[DELTA_C1_Y4] * unit);
347 ctx.moveTo(xoffset + scan[DELTA_C2_X1] * unit, yoffset + scan[DELTA_C2_Y1] * unit);
348 ctx.lineTo(xoffset + scan[DELTA_C2_X2] * unit, yoffset + scan[DELTA_C2_Y2] * unit);
349 ctx.lineTo(xoffset + scan[DELTA_C2_X3] * unit, yoffset + scan[DELTA_C2_Y3] * unit);
350 ctx.lineTo(xoffset + scan[DELTA_C2_X4] * unit, yoffset + scan[DELTA_C2_Y4] * unit);
355 drawTPt(scan, DELTA_C1_X1, DELTA_T1, xoffset, yoffset, unit);
356 drawTPt(scan, DELTA_C2_X1, DELTA_T2, xoffset, yoffset, unit);
368 ctx.moveTo(xoffset + scan[TANGENT_TANGENT_X1] * unit, yoffset + scan[TANGENT_TANGENT_Y1] * unit);
369 ctx.lineTo(xoffset + scan[TANGENT_TANGENT_X2] * unit, yoffset + scan[TANGENT_TANGENT_Y2] * unit);
471 var unit = scale * ticks;
472 mouseX = (e.clientX - left - Math.ceil(at_x) + 1) / unit + xStart;
473 mouseY = (e.clientY - top - Math.ceil(at_y)) / unit + yStart;