Home | History | Annotate | Download | only in Intersection

Lines Matching full:unit

237 function drawPoint(px, py, xoffset, yoffset, unit) {
239 var _px = px * unit + xoffset;
240 var _py = py * unit + yoffset;
254 var unit = scale * ticks;
261 ctx.lineTo(_at_x + unit * columns, _at_y + i * minScale);
268 ctx.lineTo(_at_x + i * minScale, _at_y + unit * rows);
272 var xoffset = xStart * -unit + _at_x;
273 var yoffset = yStart * -unit + _at_y;
279 ctx.fillText(num.toFixed(decimal_places), xoffset + num * unit - 5, 10);
284 ctx.fillText(num.toFixed(decimal_places), 0, yoffset + num * unit + 0);
292 ctx.moveTo(xoffset + curve[0] * unit, yoffset + curve[1] * unit);
296 xoffset + curve[2] * unit, yoffset + curve[3] * unit,
297 xoffset + curve[4] * unit, yoffset + curve[5] * unit);
301 xoffset + curve[2] * unit, yoffset + curve[3] * unit,
302 xoffset + curve[4] * unit, yoffset + curve[5] * unit,
303 xoffset + curve[6] * unit, yoffset + curve[7] * unit);
310 ctx.moveTo(xoffset + curve[0] * unit, yoffset + curve[1] * unit);
311 ctx.lineTo(xoffset + curve[2] * unit, yoffset + curve[3] * unit);
312 ctx.lineTo(xoffset + curve[4] * unit, yoffset + curve[5] * unit);
314 ctx.lineTo(xoffset + curve[6] * unit, yoffset + curve[7] * unit);
319 drawFat(test[0], xoffset, yoffset, unit);
321 drawFat(test[1], xoffset, yoffset, unit);
323 drawCtl(test[0], xoffset, yoffset, unit);
325 drawCtl(test[1], xoffset, yoffset, unit);
327 drawCtlPts(test[0], xoffset, yoffset, unit);
329 drawCtlPts(test[1], xoffset, yoffset, unit);
332 function drawCtl(curve, xoffset, yoffset, unit) {
336 ctx.moveTo(xoffset + curve[0] * unit, yoffset + curve[1] * unit);
337 ctx.lineTo(xoffset + curve[2] * unit, yoffset + curve[3] * unit);
338 ctx.lineTo(xoffset + curve[4] * unit, yoffset + curve[5] * unit);
342 function drawCtlPts(curve, xoffset, yoffset, unit) {
343 drawPoint(curve[0], curve[1], xoffset, yoffset, unit);
344 drawPoint(curve[2], curve[3], xoffset, yoffset, unit);
345 drawPoint(curve[4], curve[5], xoffset, yoffset, unit);
348 function drawFat(curve, xoffset, yoffset, unit) {
352 ctx.moveTo(xoffset + curve[0] * unit, yoffset + curve[1] * unit);
353 ctx.lineTo(xoffset + curve[last] * unit, yoffset + curve[last + 1] * unit);
358 drawParallelLine(curve[2], curve[3], dx, dy, xoffset, yoffset, unit);
360 drawParallelLine(curve[4], curve[5], dx, dy, xoffset, yoffset, unit);
363 function drawParallelLine(x, y, dx, dy, xoffset, yoffset, unit) {
369 ctx.moveTo(xoffset + x1 * unit, yoffset + y1 * unit);
370 ctx.lineTo(xoffset + x2 * unit, yoffset + y2 * unit);