Lines Matching refs:ctx

107     var ctx = canvas.getContext('2d');
119 ctx.beginPath();
120 ctx.moveTo(x1 + 0.5, y1 + 0.5);
121 ctx.lineTo(x2 + 0.5, y2 + 0.5);
122 ctx.stroke();
128 ctx.save();
129 ctx.translate(x1, y1);
130 ctx.rotate(-Math.PI / 2);
131 ctx.fillText(text, 0, 0);
132 ctx.restore();
136 ctx.fillText(text, x1, y1);
143 ctx.clearRect(0, 0, canvas.width, canvas.height);
145 ctx.beginPath();
146 ctx.lineWidth = 0.7;
147 ctx.strokeStyle = style.strokeClr;
148 ctx.setLineDash([]);
149 ctx.font = '9px Arial';
150 ctx.textAlign = 'center';
228 ctx.fillStyle = style.outBkgClr;
236 ctx.fillRect(0, RULER_THICKNESS, RULER_THICKNESS, oh);
241 ctx.fillRect(0, rEnd, RULER_THICKNESS, canvas.height);
250 ctx.fillRect(RULER_THICKNESS, 0, ow, RULER_THICKNESS);
255 ctx.fillRect(rEnd, 0, canvas.width, RULER_THICKNESS);
261 ctx.fillStyle = style.fontClr;
291 ctx.lineWidth = 1;
293 ctx.fillStyle = style.cornerClr;
294 ctx.fillRect(0, 0, RULER_THICKNESS, RULER_THICKNESS);
420 ctx.putImageData(ruler.guidePart.imgData1, ruler.guidePart.x1, ruler.guidePart.y1);
421 ctx.putImageData(ruler.guidePart.imgData2, ruler.guidePart.x2, ruler.guidePart.y2);
422 ctx.putImageData(ruler.guidePart.imgData3, ruler.guidePart.x3, ruler.guidePart.y3);
435 ctx.lineWidth = 0.5;
436 ctx.strokeStyle = style.guideClr;
437 ctx.setLineDash([2]);
447 imgData1 = ctx.getImageData(x1, y1 - 1, RULER_THICKNESS, 3);
450 imgData2 = ctx.getImageData(x2, y2 - 1, RULER_THICKNESS, 3);
453 imgData3 = ctx.getImageData(x3, y3 - 1, RULER_THICKNESS, 3);
465 imgData1 = ctx.getImageData(x1 - 1, y1, 3, RULER_THICKNESS);
468 imgData2 = ctx.getImageData(x2 - 1, y2, 3, RULER_THICKNESS);
471 imgData3 = ctx.getImageData(x3 - 1, y3, 3, RULER_THICKNESS);
514 ctx.putImageData(ruler.guidePart.imgData1, ruler.guidePart.x1, ruler.guidePart.y1);
515 ctx.putImageData(ruler.guidePart.imgData2, ruler.guidePart.x2, ruler.guidePart.y2);
516 ctx.putImageData(ruler.guidePart.imgData3, ruler.guidePart.x3, ruler.guidePart.y3);