feature: generate pdf from actor

This commit is contained in:
Matthieu CAILLEAUX
2021-10-18 22:15:23 +02:00
parent 145207a1c5
commit c66feaf642
8 changed files with 206 additions and 31 deletions

29
src/elements/blank.ts Normal file
View File

@@ -0,0 +1,29 @@
import { AbstractElement } from './abstract-element';
import jsPDF from 'jspdf';
import { Box } from './box';
export class Blank extends Box {
constructor(x: number, y: number, w: number, h: number) {
super(x, y, w, h);
}
public static heightBlank(h: number) {
return new Blank(0, 0, 0, h);
}
public getCheckNewPageHeight(doc?: jsPDF): number {
return this.getHeight(doc);
}
public prepareRender(doc: jsPDF, _maxWidth?: number): jsPDF {
return doc;
}
public render(doc: jsPDF, _maxWidth?: number): jsPDF {
return doc;
}
public getElements(): AbstractElement[] {
return [this];
}
}