diff --git a/src/elem.js b/src/elem.js index d2fd633..538ac12 100644 --- a/src/elem.js +++ b/src/elem.js @@ -73,6 +73,8 @@ export class Component { return out } + /* ------------------------------ */ + g(...args) { let el = this.#create('g') if (args.length) { @@ -103,6 +105,14 @@ export class Component { return this.#create('foreignObject', { x, y, width, height }, text) } + line(x1, y1, x2, y2, attr = {}) { + return this.#create('line', { x1, y1, x2, y2, ...attr }) + } + + polyline(...points) { + return this.#create('polyline', { points }) + } + path(d) { return this.#create('path', { d }) }