UNPKG

@visactor/vrender-core

Version:
31 lines (24 loc) 947 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: !0 }), exports.Arrow2UpSymbol = exports.arrow2Up = void 0; const base_1 = require("./base"); function arrow2Up(ctx, r, transX, transY) { const r2 = 2 * r; return ctx.moveTo(transX - r2, transY + r), ctx.lineTo(transX, transY - r), ctx.lineTo(transX + r2, transY + r), !0; } exports.arrow2Up = arrow2Up; class Arrow2UpSymbol extends base_1.BaseSymbol { constructor() { super(...arguments), this.type = "arrow2Up", this.pathStr = "M -0.5 0.25 L 0 -0.25 l 0.5 0.25"; } draw(ctx, size, transX, transY) { return arrow2Up(ctx, this.parseSize(size) / 4, transX, transY); } drawOffset(ctx, size, transX, transY, offset) { return arrow2Up(ctx, this.parseSize(size) / 4 + offset, transX, transY); } } exports.Arrow2UpSymbol = Arrow2UpSymbol, exports.default = new Arrow2UpSymbol; //# sourceMappingURL=arrow2-up.js.map