V2: Added Webserver for faster formatting

This commit is contained in:
Media
2026-07-25 15:13:23 -05:00
parent eed911cffa
commit 3eab672c6c
22 changed files with 3737 additions and 128 deletions
+38
View File
@@ -0,0 +1,38 @@
from pathlib import Path
import fitz # type: ignore
def make_geometry_pdf(path: Path) -> Path:
"""Create the same non-empty geometry fixture used for the legacy golden."""
doc = fitz.open()
page = doc.new_page(width=792, height=612)
page.draw_rect(page.rect, color=(1, 1, 1), fill=(1, 1, 1), width=0)
page.draw_rect(
fitz.Rect(0, 0, 96, 48),
color=(1, 0, 0),
fill=(1, 0, 0),
width=0,
)
page.draw_rect(
fitz.Rect(696, 564, 792, 612),
color=(0, 0, 1),
fill=(0, 0, 1),
width=0,
)
page.draw_line(
fitz.Point(0, 306),
fitz.Point(792, 306),
color=(0, 0, 0),
width=2,
)
page.insert_text(
(310, 320),
"GEOMETRY FIXTURE",
fontsize=20,
color=(0, 0, 0),
)
doc.save(path)
doc.close()
return path