@stringsync/vexml
Version:
MusicXML to Vexflow
143 lines (142 loc) • 3.61 kB
JavaScript
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.NoopRenderContext = void 0;
/* eslint-disable @typescript-eslint/no-unused-vars */
const vexflow = __importStar(require("vexflow"));
class NoopRenderContext extends vexflow.RenderContext {
clear() { }
setFillStyle(style) {
return this;
}
setBackgroundFillStyle(style) {
return this;
}
setStrokeStyle(style) {
return this;
}
setShadowColor(color) {
return this;
}
setShadowBlur(blur) {
return this;
}
setLineWidth(width) {
return this;
}
setLineCap(capType) {
return this;
}
setLineDash(dashPattern) {
return this;
}
scale(x, y) {
return this;
}
rect(x, y, width, height) {
return this;
}
resize(width, height) {
return this;
}
fillRect(x, y, width, height) {
return this;
}
clearRect(x, y, width, height) {
return this;
}
pointerRect(x, y, width, height) {
return this;
}
beginPath() {
return this;
}
moveTo(x, y) {
return this;
}
lineTo(x, y) {
return this;
}
bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) {
return this;
}
quadraticCurveTo(cpx, cpy, x, y) {
return this;
}
arc(x, y, radius, startAngle, endAngle, counterclockwise) {
return this;
}
fill(attributes) {
return this;
}
stroke() {
return this;
}
closePath() {
return this;
}
fillText(text, x, y) {
return this;
}
save() {
return this;
}
restore() {
return this;
}
openGroup(cls, id) { }
closeGroup() { }
openRotation(angleDegrees, x, y) { }
closeRotation() { }
add(child) { }
measureText(text) {
return { x: 0, y: 0, width: 0, height: 0 };
}
set fillStyle(style) { }
get fillStyle() {
return '';
}
set strokeStyle(style) { }
get strokeStyle() {
return '';
}
setFont(f, size, weight, style) {
return this;
}
getFont() {
return '';
}
}
exports.NoopRenderContext = NoopRenderContext;