UNPKG

@disjukr/croquis-js

Version:
81 lines (80 loc) 2.28 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var noop = function () { }; exports.dummyCanvasContext = { canvas: {}, direction: 'ltr', fillStyle: '#000000', filter: 'none', font: '10px sans-serif', globalAlpha: 1, globalCompositeOperation: 'source-over', imageSmoothingEnabled: true, imageSmoothingQuality: 'low', lineCap: 'butt', lineDashOffset: 0, lineJoin: 'miter', lineWidth: 1, miterLimit: 10, shadowBlur: 0, shadowColor: 'rgba(0, 0, 0, 0)', shadowOffsetX: 0, shadowOffsetY: 0, strokeStyle: '#000000', textAlign: 'start', textBaseline: 'alphabetic', save: noop, restore: noop, scale: noop, rotate: noop, translate: noop, transform: noop, setTransform: noop, getTransform: function () { return new DOMMatrix(); }, resetTransform: noop, createLinearGradient: function () { return ({ addColorStop: noop }); }, createRadialGradient: function () { return ({ addColorStop: noop }); }, createPattern: function () { return null; }, clearRect: noop, fillRect: noop, strokeRect: noop, beginPath: noop, fill: noop, stroke: noop, drawFocusIfNeeded: noop, scrollPathIntoView: noop, clip: noop, isPointInPath: function () { return false; }, isPointInStroke: function () { return false; }, fillText: noop, strokeText: noop, measureText: function () { return ({ actualBoundingBoxAscent: 0, actualBoundingBoxDescent: 0, actualBoundingBoxLeft: 0, actualBoundingBoxRight: 0, alphabeticBaseline: 0, emHeightAscent: 0, emHeightDescent: 0, fontBoundingBoxAscent: 0, fontBoundingBoxDescent: 0, hangingBaseline: 0, ideographicBaseline: 0, width: 0, }); }, drawImage: noop, getImageData: function () { return new ImageData(1, 1); }, putImageData: noop, createImageData: function () { return new ImageData(1, 1); }, setLineDash: noop, getLineDash: function () { return []; }, closePath: noop, moveTo: noop, lineTo: noop, quadraticCurveTo: noop, bezierCurveTo: noop, arcTo: noop, rect: noop, arc: noop, ellipse: noop, };