feature: generate pdf from actor

This commit is contained in:
Matthieu CAILLEAUX
2021-10-16 23:58:31 +02:00
parent 1babf13dae
commit f96372b236
18 changed files with 1826 additions and 14 deletions

22
src/elements/box.ts Normal file
View File

@@ -0,0 +1,22 @@
import { AbstractElement } from './abstract-element';
import jsPDF from 'jspdf';
export class Box extends AbstractElement {
public w: number;
public h: number;
constructor(x: number, y: number, w: number, h: number) {
super(x, y, w);
this.w = w;
this.h = h;
}
public render(doc: jsPDF, _maxWidth?: number): jsPDF {
doc.rect(this.x, this.y, this.w, this.h);
return doc;
}
public getHeight(_doc): number {
return this.h;
}
}