epic: first try at adding a backend

This commit is contained in:
2023-10-27 12:14:12 +02:00
parent 0a5c6c5618
commit 9a5b467ab0
114 changed files with 2167 additions and 35 deletions
@@ -0,0 +1,90 @@
import {PDFFont, PDFPage, rgb} from "pdf-lib";
import {KarakterTulajdonsagok, Modifier} from "../domain-models/tulajdonsag";
import {SignedNumberToText} from "../components/Helpers";
export function DrawTulajdonsagok(page: PDFPage, tulajdonsagok: KarakterTulajdonsagok, fontSizeBase: number, pdfFont: PDFFont) {
page.drawText(tulajdonsagok.t_ero.toString(), {
x: 130,
y: 613,
size: fontSizeBase * 2,
font: pdfFont,
color: rgb(0, 0, 0),
})
page.drawText(SignedNumberToText(Modifier(tulajdonsagok.t_ero)), {
x: 176,
y: 613,
size: fontSizeBase * 2,
font: pdfFont,
color: rgb(0, 0, 0),
})
page.drawText(tulajdonsagok.t_ugy.toString(), {
x: 130,
y: 580,
size: fontSizeBase * 2,
font: pdfFont,
color: rgb(0, 0, 0),
})
page.drawText(SignedNumberToText(Modifier(tulajdonsagok.t_ugy)), {
x: 176,
y: 580,
size: fontSizeBase * 2,
font: pdfFont,
color: rgb(0, 0, 0),
})
page.drawText(tulajdonsagok.t_egs.toString(), {
x: 130,
y: 547,
size: fontSizeBase * 2,
font: pdfFont,
color: rgb(0, 0, 0),
})
page.drawText(SignedNumberToText(Modifier(tulajdonsagok.t_egs)), {
x: 176,
y: 547,
size: fontSizeBase * 2,
font: pdfFont,
color: rgb(0, 0, 0),
})
page.drawText(tulajdonsagok.t_int.toString(), {
x: 130,
y: 515,
size: fontSizeBase * 2,
font: pdfFont,
color: rgb(0, 0, 0),
})
page.drawText(SignedNumberToText(Modifier(tulajdonsagok.t_int)), {
x: 176,
y: 515,
size: fontSizeBase * 2,
font: pdfFont,
color: rgb(0, 0, 0),
})
page.drawText(tulajdonsagok.t_bol.toString(), {
x: 130,
y: 482,
size: fontSizeBase * 2,
font: pdfFont,
color: rgb(0, 0, 0),
})
page.drawText(SignedNumberToText(Modifier(tulajdonsagok.t_bol)), {
x: 176,
y: 482,
size: fontSizeBase * 2,
font: pdfFont,
color: rgb(0, 0, 0),
})
page.drawText(tulajdonsagok.t_kar.toString(), {
x: 130,
y: 449,
size: fontSizeBase * 2,
font: pdfFont,
color: rgb(0, 0, 0),
})
page.drawText(SignedNumberToText(Modifier(tulajdonsagok.t_kar)), {
x: 176,
y: 449,
size: fontSizeBase * 2,
font: pdfFont,
color: rgb(0, 0, 0),
})
}