/**
* <p> draw one pixel line </p>
* @par
am FromX
* @param formY
* @param toX
* @param toY
* @param backgroundColor - default is wh
ITe
* @param vert
ical - boolean
*/
CanvasRenderingContext2D.
PRototy
PE.onePixelLineTo = function(f
romX, fromY, toX, toY, backgroundColor, vertical) {
VAR currentStrokeStyle = this.strokeStyle;
this.beginPath();
this.moveTo(fromX, fromY);
this.lineTo(toX, toY);
this.closePath();
this.lineWidth=2;
this.stroke();
this.beginPath();
if(vertical) {
this.moveTo(fromX+1, fromY);
this.lineTo(toX+1, toY);
} else {
this.moveTo(fromX, fromY+1);
this.lineTo(toX, toY+1);
}
this.closePath();
this.lineWidth=2;
this.strokeStyle=backgroundColor;
this.stroke();
this.strokeStyle = currentStrokeStyle;
};