Lines Matching refs:ctx

1400 var ctx = __w_pdfjs_require__(26);
1419 …exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call…
2542 var ctx = __w_pdfjs_require__(26);
2570 if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
3093 var ctx = __w_pdfjs_require__(26);
3280 then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
3305 executor(ctx($resolve, this, 1), ctx($reject, this, 1));
3342 this.resolve = ctx($resolve, promise, 1);
3343 this.reject = ctx($reject, promise, 1);
3438 var ctx = __w_pdfjs_require__(26);
3457 var f = ctx(fn, that, entries ? 2 : 1);
3499 var ctx = __w_pdfjs_require__(26);
3556 process.nextTick(ctx(run, id, 1));
3560 Dispatch.now(ctx(run, id, 1));
3566 defer = ctx(port.postMessage, port, 1);
3582 setTimeout(ctx(run, id, 1), 0);
3979 var ctx = __w_pdfjs_require__(26);
4000 var f = ctx(callbackfn, that, 3);
4517 var ctx = __w_pdfjs_require__(26);
4534 cb = ctx(mapFn, arguments[2], 2);
13863 var ctx = canvas.getContext('2d');
13875 ctx.font = '30px ' + name;
13876 ctx.fillText('.', 0, 20);
13877 var imageData = ctx.getImageData(0, 0, 1, 1);
14169 function addContextCurrentTransform(ctx) {
14170 if (!ctx.mozCurrentTransform) {
14171 ctx._originalSave = ctx.save;
14172 ctx._originalRestore = ctx.restore;
14173 ctx._originalRotate = ctx.rotate;
14174 ctx._originalScale = ctx.scale;
14175 ctx._originalTranslate = ctx.translate;
14176 ctx._originalTransform = ctx.transform;
14177 ctx._originalSetTransform = ctx.setTransform;
14178 ctx._transformMatrix = ctx._transformMatrix || [1, 0, 0, 1, 0, 0];
14179 ctx._transformStack = [];
14180 Object.defineProperty(ctx, 'mozCurrentTransform', {
14185 Object.defineProperty(ctx, 'mozCurrentTransformInverse', {
14200 ctx.save = function ctxSave() {
14210 ctx.restore = function ctxRestore() {
14220 ctx.translate = function ctxTranslate(x, y) {
14228 ctx.scale = function ctxScale(x, y) {
14238 ctx.transform = function ctxTransform(a, b, c, d, e, f) {
14242 ctx._originalTransform(a, b, c, d, e, f);
14245 ctx.setTransform = function ctxSetTransform(a, b, c, d, e, f) {
14248 ctx._originalSetTransform(a, b, c, d, e, f);
14251 ctx.rotate = function ctxRotate(angle) {
14521 this.ctx = canvasCtx;
14550 function putBinaryImageData(ctx, imgData) {
14552 ctx.putImageData(imgData, 0, 0);
14561 var chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT);
14615 ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);
14624 ctx.putImageData(chunkImgData, 0, j);
14631 ctx.putImageData(chunkImgData, 0, j);
14652 ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);
14659 function putBinaryImageMask(ctx, imgData) {
14665 var chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT);
14689 ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);
14710 function resetCtxToDefault(ctx) {
14711 ctx.strokeStyle = '#000000';
14712 ctx.fillStyle = '#000000';
14713 ctx.fillRule = 'nonzero';
14714 ctx.globalAlpha = 1;
14715 ctx.lineWidth = 1;
14716 ctx.lineCap = 'butt';
14717 ctx.lineJoin = 'miter';
14718 ctx.miterLimit = 10;
14719 ctx.globalCompositeOperation = 'source-over';
14720 ctx.font = '10px sans-serif';
14722 if (ctx.setLineDash !== undefined) {
14723 ctx.setLineDash([]);
14724 ctx.lineDashOffset = 0;
14796 function composeSMask(ctx, smask, layerCtx, webGLContext) {
14799 ctx.setTransform(smask.scaleX, 0, 0, smask.scaleY, smask.offsetX, smask.offsetY);
14811 ctx.setTransform(1, 0, 0, 1, 0, 0);
14812 ctx.drawImage(composed, smask.offsetX, smask.offsetY);
14817 ctx.drawImage(mask, 0, 0);
14832 var width = this.ctx.canvas.width;
14833 var height = this.ctx.canvas.height;
14834 this.ctx.save();
14835 this.ctx.fillStyle = background || 'rgb(255, 255, 255)';
14836 this.ctx.fillRect(0, 0, width, height);
14837 this.ctx.restore();
14841 this.compositeCtx = this.ctx;
14843 this.ctx = transparentCanvas.context;
14844 this.ctx.save();
14845 this.ctx.transform.apply(this.ctx, this.compositeCtx.mozCurrentTransform);
14848 this.ctx.save();
14849 resetCtxToDefault(this.ctx);
14852 this.ctx.transform.apply(this.ctx, transform);
14855 this.ctx.transform.apply(this.ctx, viewport.transform);
14856 this.baseTransform = this.ctx.mozCurrentTransform.slice();
14941 this.ctx.restore();
14944 this.ctx = this.compositeCtx;
14945 this.ctx.save();
14946 this.ctx.setTransform(1, 0, 0, 1, 0, 0);
14947 this.ctx.drawImage(this.transparentCanvas, 0, 0);
14948 this.ctx.restore();
14961 this.ctx.lineWidth = width;
14964 this.ctx.lineCap = LINE_CAP_STYLES[style];
14967 this.ctx.lineJoin = LINE_JOIN_STYLES[style];
14970 this.ctx.miterLimit = limit;
14973 var ctx = this.ctx;
14975 if (ctx.setLineDash !== undefined) {
14976 ctx.setLineDash(dashArray);
14977 ctx.lineDashOffset = dashPhase;
15027 this.ctx.globalAlpha = state[1];
15031 this.ctx.globalCompositeOperation = value;
15060 var currentCtx = this.ctx;
15062 this.ctx.save();
15069 this.ctx = groupCtx;
15075 var groupCtx = this.ctx;
15077 this.ctx = this.groupStack.pop();
15078 composeSMask(this.ctx, this.current.activeSMask, groupCtx, this.webGLContext);
15079 this.ctx.restore();
15080 this.ctx.save();
15081 copyCtxState(groupCtx, this.ctx);
15086 this.ctx.transform.apply(this.ctx, deltaTransform);
15094 var currentCtx = this.ctx;
15095 this.ctx = groupCtx;
15100 var groupCtx = this.ctx;
15102 this.ctx = this.groupStack.pop();
15103 composeSMask(this.ctx, this.current.activeSMask, groupCtx, this.webGLContext);
15104 this.ctx.restore();
15105 copyCtxState(groupCtx, this.ctx);
15109 this.ctx.transform.apply(this.ctx, deltaTransform);
15112 this.ctx.save();
15129 this.ctx.restore();
15135 this.ctx.transform(a, b, c, d, e, f);
15139 var ctx = this.ctx;
15162 this.ctx.moveTo(x, y);
15163 this.ctx.lineTo(xw, y);
15164 this.ctx.lineTo(xw, yh);
15165 this.ctx.lineTo(x, yh);
15166 this.ctx.lineTo(x, y);
15167 this.ctx.closePath();
15173 ctx.moveTo(x, y);
15179 ctx.lineTo(x, y);
15185 ctx.bezierCurveTo(args[j], args[j + 1], args[j + 2], args[j + 3], x, y);
15190 ctx.bezierCurveTo(x, y, args[j], args[j + 1], args[j + 2], args[j + 3]);
15199 ctx.bezierCurveTo(args[j], args[j + 1], x, y, x, y);
15204 ctx.closePath();
15212 this.ctx.closePath();
15216 var ctx = this.ctx;
15218ctx.lineWidth = Math.max(this.getSinglePixelWidth() * MIN_WIDTH_FACTOR, this.current.lineWidth);
15219 ctx.globalAlpha = this.current.strokeAlpha;
15222 ctx.save();
15223 ctx.strokeStyle = strokeColor.getPattern(ctx, this);
15224 ctx.stroke();
15225 ctx.restore();
15227 ctx.stroke();
15234 ctx.globalAlpha = this.current.fillAlpha;
15242 var ctx = this.ctx;
15248 ctx.save();
15251 ctx.setTransform.apply(ctx, this.baseTransform);
15254 ctx.fillStyle = fillColor.getPattern(ctx, this);
15259 ctx.fill('evenodd');
15262 ctx.fill();
15266 ctx.restore();
15312 var ctx = this.ctx;
15315 ctx.beginPath();
15319 ctx.save();
15320 ctx.beginPath();
15324 ctx.setTransform.apply(ctx, path.transform);
15325 ctx.translate(path.x, path.y);
15326 path.addToPath(ctx, path.fontSize);
15329 ctx.restore();
15330 ctx.clip();
15331 ctx.beginPath();
15380 …this.ctx.font = "".concat(italic, " ").concat(bold, " ").concat(browserFontSize, "px ").concat(typ…
15406 var ctx = this.ctx;
15421 ctx.save();
15422 ctx.translate(x, y);
15423 ctx.beginPath();
15424 addToPath(ctx, fontSize);
15427 ctx.setTransform.apply(ctx, patternTransform);
15431 ctx.fill();
15435 ctx.stroke();
15438 ctx.restore();
15441 ctx.fillText(character, x, y);
15445 ctx.strokeText(character, x, y);
15452 transform: ctx.mozCurrentTransform,
15463 ctx = _this$cachedCanvases$.context;
15465 ctx.scale(1.5, 1);
15466 ctx.fillText('I', 0, 10);
15467 var data = ctx.getImageData(0, 0, 10, 10).data;
15494 var ctx = this.ctx;
15506 ctx.save();
15510 ctx.save();
15511 var pattern = current.fillColor.getPattern(ctx, this);
15512 patternTransform = ctx.mozCurrentTransform;
15513 ctx.restore();
15514 ctx.fillStyle = pattern;
15517 ctx.transform.apply(ctx, current.textMatrix);
15518 ctx.translate(current.x, current.y + current.textRise);
15521 ctx.scale(textHScale, -1);
15523 ctx.scale(textHScale, 1);
15541 ctx.scale(fontSizeScale, fontSizeScale);
15545 ctx.lineWidth = lineWidth;
15579 var measuredWidth = ctx.measureText(character).width * 1000 / fontSize * fontSizeScale;
15584 ctx.save();
15585 ctx.scale(characterScaleX, 1);
15594 ctx.fillText(character, scaledX, scaledY);
15610 ctx.restore();
15620 ctx.restore();
15623 var ctx = this.ctx;
15642 ctx.save();
15643 ctx.transform.apply(ctx, current.textMatrix);
15644 ctx.translate(current.x, current.y);
15645 ctx.scale(textHScale, fontDirection);
15652 this.ctx.translate(spacingLength, 0);
15667 ctx.scale(fontSize, fontSize);
15668 ctx.transform.apply(ctx, fontMatrix);
15675 ctx.translate(width, 0);
15679 ctx.restore();
15684 this.ctx.rect(llx, lly, urx - llx, ury - lly);
15695 var baseTransform = this.baseTransform || this.ctx.mozCurrentTransform.slice();
15697 createCanvasGraphics: function createCanvasGraphics(ctx) {
15698 …return new CanvasGraphics(ctx, _this.commonObjs, _this.objs, _this.canvasFactory, _this.webGLConte…
15701 …pattern = new _pattern_helper.TilingPattern(IR, color, this.ctx, canvasGraphicsFactory, baseTransf…
15718 this.ctx.strokeStyle = color;
15724 this.ctx.fillStyle = color;
15729 var ctx = this.ctx;
15732 ctx.fillStyle = pattern.getPattern(ctx, this, true);
15733 var inv = ctx.mozCurrentTransformInverse;
15736 var canvas = ctx.canvas;
15752 this.ctx.fillRect(x0, y0, x1 - x0, y1 - y0);
15754 this.ctx.fillRect(-1e10, -1e10, 2e10, 2e10);
15773 this.baseTransform = this.ctx.mozCurrentTransform;
15778 this.ctx.rect(bbox[0], bbox[1], width, height);
15789 var currentCtx = this.ctx;
15862 this.ctx = groupCtx;
15870 var groupCtx = this.ctx;
15871 this.ctx = this.groupStack.pop();
15873 if (this.ctx.imageSmoothingEnabled !== undefined) {
15874 this.ctx.imageSmoothingEnabled = false;
15876 this.ctx.mozImageSmoothingEnabled = false;
15882 this.ctx.drawImage(groupCtx.canvas, 0, 0);
15891 this.ctx.setTransform.apply(this.ctx, this.baseTransform);
15899 resetCtxToDefault(this.ctx);
15905 this.ctx.rect(rect[0], rect[1], width, height);
15925 var ctx = this.ctx;
15926 ctx.scale(1 / w, -1 / h);
15927 ctx.drawImage(domImage, 0, 0, domImage.width, domImage.height, 0, -h, w, h);
15930 var currentTransform = ctx.mozCurrentTransformInverse;
15944 var ctx = this.ctx;
15964 glyph.compiled(ctx);
15991 var ctx = this.ctx;
15994 ctx.save();
15995 ctx.transform(scaleX, 0, 0, scaleY, positions[i], positions[i + 1]);
15996 ctx.scale(1, -1);
15997 ctx.drawImage(maskCanvas.canvas, 0, 0, width, height, 0, -1, 1, 1);
15998 ctx.restore();
16002 var ctx = this.ctx;
16018 ctx.save();
16019 ctx.transform.apply(ctx, image.transform);
16020 ctx.scale(1, -1);
16021 ctx.drawImage(maskCanvas.canvas, 0, 0, width, height, 0, -1, 1, 1);
16022 ctx.restore();
16062 var ctx = this.ctx;
16064 ctx.scale(1 / width, -1 / height);
16065 var currentTransform = ctx.mozCurrentTransformInverse;
16111 ctx.drawImage(imgToPaint, 0, 0, paintWidth, paintHeight, 0, -height, width, height);
16127 var ctx = this.ctx;
16136 ctx.save();
16137 ctx.transform.apply(ctx, entry.transform);
16138 ctx.scale(1, -1);
16139 ctx.drawImage(tmpCanvas.canvas, entry.x, entry.y, entry.w, entry.h, 0, -1, 1, 1);
16152 ctx.restore();
16156 this.ctx.fillRect(0, 0, 1, 1);
16169 var ctx = this.ctx;
16173 ctx.clip('evenodd');
16175 ctx.clip();
16181 ctx.beginPath();
16185 var inverse = this.ctx.mozCurrentTransformInverse;
16192 var transform = this.ctx.mozCurrentTransform;
16232 getPattern: function RadialAxial_getPattern(ctx) {
16236 grad = ctx.createLinearGradient(p0[0], p0[1], p1[0], p1[1]);
16238 grad = ctx.createRadialGradient(p0[0], p0[1], r0, p1[0], p1[1], r1);
16463 getPattern: function Mesh_getPattern(ctx, owner, shadingFill) {
16467 scale = _util.Util.singularValueDecompose2dScale(ctx.mozCurrentTransform);
16481 ctx.setTransform.apply(ctx, owner.baseTransform);
16484 ctx.transform.apply(ctx, matrix);
16488 ctx.translate(temporaryPatternCanvas.offsetX, temporaryPatternCanvas.offsetY);
16489 ctx.scale(temporaryPatternCanvas.scaleX, temporaryPatternCanvas.scaleY);
16490 return ctx.createPattern(temporaryPatternCanvas.canvas, 'no-repeat');
16523 function TilingPattern(IR, color, ctx, canvasGraphicsFactory, baseTransform) {
16535 this.ctx = ctx;
16559 var dimx = this.getSizeAndScale(xstep, this.ctx.canvas.width, combinedScale[0]);
16560 var dimy = this.getSizeAndScale(ystep, this.ctx.canvas.height, combinedScale[1]);
16570 this.ctx.transform(1, 0, 0, 1, x0, y0);
16571 this.ctx.scale(1 / dimx.scale, 1 / dimy.scale);
16594 graphics.ctx.rect(x0, y0, bboxWidth, bboxHeight);
16600 var context = graphics.ctx,
16605 var ctx = this.ctx;
16606 context.fillStyle = ctx.fillStyle;
16607 context.strokeStyle = ctx.strokeStyle;
16608 current.fillColor = ctx.fillStyle;
16609 current.strokeColor = ctx.strokeStyle;
16625 getPattern: function TilingPattern_getPattern(ctx, owner) {
16626 ctx = this.ctx;
16627 ctx.setTransform.apply(ctx, this.baseTransform);
16628 ctx.transform.apply(ctx, this.matrix);
16630 return ctx.createPattern(temporaryPatternCanvas, 'repeat');