Lines Matching refs:ctx

20 	this.ctx = canvas.getContext('2d');
21 this.ctx.textBaseline = 'top';
22 this.ctx.fillStyle = 'rgba(255,255,255,0)';
23 this.ctx.strokeStyle = 'rgba(0, 0, 0, 0)';
43 mxJsCanvas.prototype.ctx = null; method in mxJsCanvas
125 this.ctx.font = style + this.state.fontSize + 'px ' + this.state.fontFamily;
132 this.ctx.save();
138 this.ctx.restore();
145 this.ctx.scale(s, s);
152 this.ctx.translate(dx, dy);
162 this.ctx.translate(cx, cy);
169 this.ctx.scale(sx, sy);
172 this.ctx.rotate(theta * this.M_RAD_PER_DEG);
173 this.ctx.translate(-cx, -cy);
179 this.ctx.globalAlpha = alpha;
196 this.ctx.fillStyle = value;
201 var gradient = this.ctx.createLinearGradient(0, y, 0, y + h);
223 this.ctx.fillStyle = gradient;
235 this.ctx.strokeStyle = 'rgba(0, 0, 0, 0)';
239 this.ctx.strokeStyle = value;
246 this.ctx.lineWidth = value;
274 if (typeof this.ctx.setLineDash === "function")
276 this.ctx.setLineDash(value);
302 this.ctx.setLineDash(dashArray);
308 this.ctx.lineCap = value;
313 this.ctx.lineJoin = value;
318 this.ctx.lineJoin = value;
323 this.ctx.fillStyle = value;
377 this.ctx.shadowColor = 'transparent';
378 this.ctx.shadowBlur = 0;
379 this.ctx.shadowOffsetX = 0;
380 this.ctx.shadowOffsetY = 0;
394 this.ctx.shadowColor = 'transparent';
404 this.ctx.shadowColor = 'rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ',' + alpha + ')';
432 this.ctx.shadowOffsetX = dx;
433 this.ctx.shadowOffsetY = dy;
439 this.ctx.moveTo(x, y);
446 this.ctx.lineTo(x, y);
453 this.ctx.quadraticCurveTo(x1, y1, x2, y2);
474 this.ctx.bezierCurveTo(x1, y1, x2, y2 , x3, y3);
506 this.ctx.save();
507 this.ctx.translate((x + w / 2), (y + h / 2));
508 this.ctx.scale(w / 2, h / 2);
509 this.ctx.beginPath();
510 this.ctx.arc(0, 0, 1, 0, 2 * Math.PI, false);
511 this.ctx.restore();
537 function drawImage(ctx, image, x, y, w, h) argument
539 ctx.save();
560 ctx.translate(2 * x + w, 0);
561 ctx.scale(-1, 1);
566 ctx.translate(0, 2 * y + h);
567 ctx.scale(1, -1);
570 ctx.drawImage(image, x, y, w, h);
571 ctx.restore();
576 drawImage.call(this, this.ctx, image, x, y, w, h);
586 this.ctx.beginPath();
591 this.ctx.closePath();
596 this.ctx.fill();
601 this.ctx.stroke();
610 this.ctx.fill();
611 this.ctx.stroke();
615 this.ctx.stroke();
616 this.ctx.fill();
618 var shadowColor = this.ctx.shadowColor;
619 var shadowOffsetX = this.ctx.shadowOffsetX;
620 var shadowOffsetY = this.ctx.shadowOffsetY;
622 this.ctx.shadowColor = 'transparent';
623 this.ctx.shadowOffsetX = 0;
624 this.ctx.shadowOffsetY = 0;
626 this.ctx.stroke();
628 this.ctx.shadowColor = shadowColor;
629 this.ctx.shadowOffsetX = shadowOffsetX;
630 this.ctx.shadowOffsetY = shadowOffsetY;
647 this.ctx.translate(Math.round(x), Math.round(y));
648 this.ctx.rotate(rotation * Math.PI / 180);
649 this.ctx.translate(Math.round(-x), Math.round(-y));
678 this.ctx.save();
685 this.ctx.fillStyle = this.state.fontBackgroundColor;
686 …this.ctx.fillRect(Math.round(x) - 0.5, Math.round(y) - 0.5, Math.round(subCanvas.width / sc), Math…
690 this.ctx.strokeStyle = this.state.fontBorderColor;
691 this.ctx.lineWidth = 1;
692 …this.ctx.strokeRect(Math.round(x) - 0.5, Math.round(y) - 0.5, Math.round(subCanvas.width / sc), Ma…
698 this.ctx.scale(1/sc, 1/sc);
701 this.ctx.drawImage(subCanvas, Math.round(x * sc) ,Math.round(y * sc));
703 this.ctx.restore();
708 this.ctx.save();
726 this.ctx.textBaseline = 'top';
732 this.ctx.textBaseline = 'middle';
737 this.ctx.textBaseline = 'alphabetic';
749 lineWidth[i] = this.ctx.measureText(lines[i]).width;
773 this.ctx.save();
780 this.ctx.fillStyle = this.state.fontBackgroundColor;
781 …this.ctx.fillRect(startMostX, backgroundY, maxWidth, this.state.fontSize * mxConstants.LINE_HEIGHT…
785 this.ctx.strokeStyle = this.state.fontBorderColor;
786 this.ctx.lineWidth = 1;
787 …this.ctx.strokeRect(startMostX, backgroundY, maxWidth, this.state.fontSize * mxConstants.LINE_HEIG…
790 this.ctx.restore();
795 this.ctx.fillText(lines[i], lineX[i], y);
799 this.ctx.restore();