v0.5.3
Example document / build (push) Has been cancelled
Python application / build (push) Has been cancelled

- Мелкие исправления увеличивающие работу конвертера
This commit is contained in:
Igor20264
2026-09-10 10:50:15 +03:00
parent 658036f920
commit f7136bd8bd
95 changed files with 7165 additions and 8771 deletions
-26
View File
@@ -2018,32 +2018,6 @@ def _draw_arrow(
return paths
def _draw_purpose(scene: _Scene, d: Idef0Diagram, work: _Rect, s: float, fonts: dict) -> _Rect | None:
"""Kept for callers; kit form does not put Purpose/Viewpoint in the work area."""
bits = []
if d.purpose:
bits.append(f"Purpose: {d.purpose}")
if d.viewpoint:
bits.append(f"Viewpoint: {d.viewpoint}")
if not bits:
return None
font = _load_font(int(fonts["small"]), False)
lines: list[str] = []
for text in bits:
lines.extend(_wrap(text, font, int(work.w * 0.40)))
if not lines:
return None
pad = 3 * s
tw, th = _label_block_size(lines, font, fonts["small"], pad)
halo = _Rect(work.x + 4 * s, work.b - th - 4 * s, tw, th)
scene.rect(halo.x, halo.y, halo.w, halo.h, width=0, fill="#ffffff", outline=None)
line_h = fonts["small"] * 1.15
y0 = halo.y + pad + fonts["small"] * 0.2
for i, ln in enumerate(lines):
scene.text(halo.x + pad, y0 + i * line_h, ln, fonts["small"], anchor="lt")
return halo.inflate(4 * s)
def render_idef0(
diagram: Idef0Diagram,
*,