code wiki / (root) / nx_render_svg.nx

nx_render_svg.nx

buildroot/runtime/nx_render_svg.nx

5453 B156 linesdepth 6pulls 6 transitivereach 3 importersview sourcekind librarytopic render
docsdependenciesstructsconstsfunctions

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

nx_kernel_v2.nx nx_render_svg.nx nx_capabilities_test.nx

imports: nx_kernel_v2.nx

imported by: nx_capabilities_test.nx

structs

none

consts

22const NX_SVG_W: nx_int = 600
23const NX_SVG_H: nx_int = 400

functions

25func nx_svg_header(width: nx_int, height: nx_int) -> nx_int
44func nx_svg_rect(x: nx_int, y: nx_int, w: nx_int, h: nx_int, fill: *u8) -> nx_int
54func nx_svg_line(x1: nx_int, y1: nx_int, x2: nx_int, y2: nx_int, stroke: *u8) -> nx_int
64func nx_svg_circle(cx: nx_int, cy: nx_int, r: nx_int, fill: *u8) -> nx_int
73func nx_svg_text(x: nx_int, y: nx_int, s: *u8) -> nx_int
83func nx_svg_bar_chart(values: *nx_int, n: nx_int, title: *u8) -> nx_int
114func nx_svg_line_plot(values: *nx_int, n: nx_int, title: *u8) -> nx_int