nx_render_svg.nx
buildroot/runtime/nx_render_svg.nx
about
nx_render_svg.nx -- native SVG (browser-visual) emitter.
Per user 2026-05-15: "build the visual in cli, browser, etc it
should be native".
Emits SVG markup as text -- standard XML. No JS dependency, no
canvas runtime. Output can be:
1. piped to a .svg file and opened in any browser
2. served by the sovereign nishi_web HTTP server (memory: Sovereign
nishi-web project) for live in-browser viewing
Pure stdout writes. Caller redirects to a file via shell.
dependencies 1 imports · 1 importers
imports: nx_kernel_v2.nx
imported by: nx_capabilities_test.nx
structs
| none |
consts
| 22 | const NX_SVG_W: nx_int = 600 |
| 23 | const NX_SVG_H: nx_int = 400 |
functions
| 25 | func nx_svg_header(width: nx_int, height: nx_int) -> nx_int |
| 39 | func nx_svg_footer() -> nx_int |
| 44 | func nx_svg_rect(x: nx_int, y: nx_int, w: nx_int, h: nx_int, fill: *u8) -> nx_int |
| 54 | func nx_svg_line(x1: nx_int, y1: nx_int, x2: nx_int, y2: nx_int, stroke: *u8) -> nx_int |
| 64 | func nx_svg_circle(cx: nx_int, cy: nx_int, r: nx_int, fill: *u8) -> nx_int |
| 73 | func nx_svg_text(x: nx_int, y: nx_int, s: *u8) -> nx_int |
| 83 | func nx_svg_bar_chart(values: *nx_int, n: nx_int, title: *u8) -> nx_int |
| 114 | func nx_svg_line_plot(values: *nx_int, n: nx_int, title: *u8) -> nx_int |