function
AddText(text, x, y, color, size) {labelCount++
var position = $("canvas").position(); var CanvasX = x + position.left + document.documentElement.scrollLeft; // -5 accounts for half the text height var CanvasY = y + position.top + document.documentElement.scrollTop - 5; var label = document.createElement("div");label.id =
"label" + labelCount;label.style.position =
"absolute";label.style.left = CanvasX;
label.style.top = CanvasY;
label.style.fontFamily =
"sans-serif";label.style.fontSize = size;
label.style.color = color;
label.appendChild(document.createTextNode(text));
document.body.appendChild(label);
}