code wiki / _hdl_build / nx_eco_graph_png.nx
nx_eco_graph_png.nx
buildroot/runtime/_hdl_build/nx_eco_graph_png.nx
about
nx_eco_graph_png.nx -- SOVEREIGN VISUAL as a real RASTER PNG (not SVG). Same generational "roots to god"
family tree as nx_eco_graph_atlas, but painted pixel-by-pixel into an i64 framebuffer and written as a
DEFLATE-COMPRESSED PNG via nx_png.write_png (adaptive filtering + dfe_compress). WHY: a PNG renders
BYTE-IDENTICALLY in every browser (Waterfox, Chrome, and our own box-layout sovereign browser) -- no SVG
parser, no rendering-quirk, no black box. Proven need: our browser renders the inline-SVG atlas as a black
box (self-verified via nx_browser_render_shot), and Waterfox hit an SVG bug too. An <img> sidesteps all of it.
Composes nx_eco_graph (graph+ancestry) + nx_font_bitmap_5x7 (labels) + nx_png (compressed encode).
Usage: nx_eco_graph_png <store-prefix> <seed-basename> <out.png> license_tier: ORIGINAL expect_exit:0
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_eco_graph.nxnx_font_bitmap_5x7.nxnx_png.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 13 | const PG_MAGIC_65536: i64 = 65536 |
| 14 | const PG_MAGIC_6000: i64 = 6000 |
| 15 | const PG_MAGIC_152036: i64 = 152036 |
| 17 | const PG_MAXS: i64 = 200 |
| 18 | const PG_W: i64 = 1180 |
| 19 | const PG_LAYH: i64 = 104 |
functions
| 21 | func pslen(s: *u8) -> i64 { var n:i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: main |
| 24 | func px_set(fb: *i64, W: i64, H: i64, x: i64, y: i64, r: i64, gg: i64, b: i64) -> i64 |
| 32 | func fill_rect(fb: *i64, W: i64, H: i64, x0: i64, y0: i64, w: i64, h: i64, r: i64, gg: i64, b: i64) -> i64 |
| 37 | func fill_disk(fb: *i64, W: i64, H: i64, cx: i64, cy: i64, rad: i64, r: i64, gg: i64, b: i64) -> i64 |
| 49 | func ring(fb: *i64, W: i64, H: i64, cx: i64, cy: i64, rad: i64, r: i64, gg: i64, b: i64) -> i64 |
| 65 | func line(fb: *i64, W: i64, H: i64, x0: i64, y0: i64, x1: i64, y1: i64, r: i64, gg: i64, b: i64) -> i64 |
| 86 | func ribbon(fb: *i64, W: i64, H: i64, x1: i64, y1: i64, x2: i64, y2: i64, r: i64, gg: i64, b: i64) -> i64 |
| 110 | func draw_char(fb: *i64, W: i64, H: i64, x: i64, y: i64, ch: i64, r: i64, gg: i64, b: i64, scale: i64) -> i64 |
| 131 | func draw_name(fb: *i64, W: i64, H: i64, g: *EcoGraph, idx: i64, cx: i64, y: i64, r: i64, gg: i64, b: i64, scale: i64) -> i64 |
| 148 | func main(argc: i64, argv: *i64) -> i64 |