@visactor/vrender-core
Version:
## Description
38 lines (33 loc) • 969 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.MoveCurve = void 0;
const base_1 = require("./base"), enums_1 = require("../../enums");
class MoveCurve extends base_1.Curve {
constructor(p0, p1) {
super(), this.type = enums_1.CurveTypeEnum.MoveCurve, this.p0 = p0, this.p1 = p1;
}
getAngleAt(t) {
throw new Error("ArcCurve暂不支持getAngleAt");
}
getPointAt(t) {
throw new Error("MoveCurve暂不支持getPointAt");
}
calcLength() {
throw new Error("MoveCurve暂不支持updateLength");
}
calcProjLength(direction) {
throw new Error("QuadraticBezierCurve暂不支持updateLength");
}
draw(path, x, y, sx, sy, percent) {
path.moveTo(this.p1.x * sx + x, this.p1.y * sy + y);
}
includeX(x) {
return !1;
}
getYAt(x) {
return 1 / 0;
}
}
exports.MoveCurve = MoveCurve;
//# sourceMappingURL=move.js.map