UNPKG

@visactor/vrender-core

Version:
23 lines (19 loc) 765 B
import { BaseSymbol } from "./base"; export function arrow2Down(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; } export class Arrow2DownSymbol extends BaseSymbol { constructor() { super(...arguments), this.type = "arrow2Down", this.pathStr = "M -0.5 -0.25 L 0 0.25 l 0.5 -0.25"; } draw(ctx, size, transX, transY) { return arrow2Down(ctx, this.parseSize(size) / 4, transX, transY); } drawOffset(ctx, size, transX, transY, offset) { return arrow2Down(ctx, this.parseSize(size) / 4 + offset, transX, transY); } } export default new Arrow2DownSymbol; //# sourceMappingURL=arrow2-down.js.map