visualisierung

This commit is contained in:
marco committed 2026-10-26 07:34:23 +01:00
1 parent d0655f3638
commit 367c93c93e
84 files changed
+2265 -148

No files matched your search

+9
View File
@@ -5,6 +5,7 @@ interface PropText {
x: number,
y: number,
text:string
centeredBox?: { width: number; height: number; fontSize: number };
}
interface SvgOptions {
@@ -37,6 +38,10 @@ export class DrawText extends DrawElement {
drawSvg() {
const box = this.posAndText.centeredBox;
if (box) {
return `<text x="${this.posAndText.x + box.width / 2}" y="${this.posAndText.y + box.height / 2}" text-anchor="middle" dominant-baseline="central" font-family="Arial" font-size="${box.fontSize}" font-weight="bold" fill="#000000">${this.posAndText.text}</text>`;
}
const paraStr = this.convertAttributesToString(this.attributes);
const posSvg = this.getSvgPositions(this.posAndText)
const posStr = this.convertAttributesToString(posSvg);
@@ -47,6 +52,10 @@ export class DrawText extends DrawElement {
}
drawXaml(): string {
const box = this.posAndText.centeredBox;
if (box) {
return `<Grid Canvas.Left="${this.posAndText.x}" Canvas.Top="${this.posAndText.y}" Width="${box.width}" Height="${box.height}"><TextBlock Text="${this.posAndText.text}" FontFamily="Arial" FontSize="${box.fontSize}" FontWeight="Bold" Foreground="#000000" HorizontalAlignment="Center" VerticalAlignment="Center"/></Grid>`;
}
const paraStr = this.convertAttributesToString(this.attributes, true);
//const posXaml = this.getXamlPositions(this.posAndText)
//const posStr = this.convertAttributesToString(posXaml, true);