geometor.poincare.render

Publication-grade interactive .euclid-graphic SVG renderer for geometor.poincare.

Generates theme-adaptive SVGs directly from exact geometor.poincare.disk symbolic constructions while preserving canonical data-ref attributes, <defs> midpoint tick markers (#geom-tick-1..3), 3-vertex midpoint <path> arcs and segments, and #highlights overlay groups consumed by PHOTON Publish’s geometor_interactive.js and .. picture:: directive.

Attributes

EMBEDDED_SVG_STYLE

FIGURE_SPECS

render_figure_svg

Functions

render_codex_figure(filename) → str

Render one of the 8 canonical .euclid-graphic codex figures by filename.

export_all_codex_figures(output_dir) → list[pathlib.Path]

Generate and write all 8 standalone .euclid-graphic SVGs into output_dir.

Module Contents

geometor.poincare.render.EMBEDDED_SVG_STYLE: str = ''
geometor.poincare.render.FIGURE_SPECS: dict[str, str]
geometor.poincare.render.render_codex_figure(filename: str) → str

Render one of the 8 canonical .euclid-graphic codex figures by filename.

Parameters:

filename – Key in FIGURE_SPECS (with or without .svg suffix).

Returns:

Complete UTF-8 SVG document string.

Raises:

KeyError – If filename is not a recognized codex figure.

geometor.poincare.render.export_all_codex_figures(output_dir: pathlib.Path) → list[pathlib.Path]

Generate and write all 8 standalone .euclid-graphic SVGs into output_dir.

Parameters:

output_dir – Target directory (e.g. docsrc/_static/figures).

Returns:

Sorted list of written SVG file paths.

geometor.poincare.render.render_figure_svg