code wiki / _hdl_build / nx_eco_graph_png.nx

nx_eco_graph_png.nx

buildroot/runtime/_hdl_build/nx_eco_graph_png.nx

13501 B330 linesdepth 5pulls 8 transitivereach 0 importersview sourcekind tooltopic eco
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_eco_graph.nx nx_font_bitmap_5x7.nx nx_png.nx nx_eco_graph_png.nx

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

main pslen sys_write sys_mmap eg_load sys_mmap ↻ sov_get_ints sys_mmap ↻ ss_get sys_mmap ↻ ss_scan sys_mmap ↻ ss_manifest_dyn ss_manifest_file_dyn ss_scan_seglist ss_len sys_mmap ↻ ss_cat ss_readall ss_r32 sov_get_copy sys_mmap ↻ ss_get ↻ eg_find eg_name_eq eg_ancestors eg_ancestors ↻ fill_rect px_set draw_char nx_font_5x7_glyph_row px_set ↻ ribbon line px_set ↻ eg_ca fill_disk px_set ↻ ring px_set ↻

structs

none

consts

13const PG_MAGIC_65536: i64 = 65536
14const PG_MAGIC_6000: i64 = 6000
15const PG_MAGIC_152036: i64 = 152036
17const PG_MAXS: i64 = 200
18const PG_W: i64 = 1180
19const PG_LAYH: i64 = 104

functions

21func pslen(s: *u8) -> i64 { var n:i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: main
24func px_set(fb: *i64, W: i64, H: i64, x: i64, y: i64, r: i64, gg: i64, b: i64) -> i64
32func fill_rect(fb: *i64, W: i64, H: i64, x0: i64, y0: i64, w: i64, h: i64, r: i64, gg: i64, b: i64) -> i64
called by 1: main calls 1: px_set
37func fill_disk(fb: *i64, W: i64, H: i64, cx: i64, cy: i64, rad: i64, r: i64, gg: i64, b: i64) -> i64
called by 1: main calls 1: px_set
49func ring(fb: *i64, W: i64, H: i64, cx: i64, cy: i64, rad: i64, r: i64, gg: i64, b: i64) -> i64
called by 1: main calls 1: px_set
65func line(fb: *i64, W: i64, H: i64, x0: i64, y0: i64, x1: i64, y1: i64, r: i64, gg: i64, b: i64) -> i64
called by 1: ribbon calls 1: px_set
86func ribbon(fb: *i64, W: i64, H: i64, x1: i64, y1: i64, x2: i64, y2: i64, r: i64, gg: i64, b: i64) -> i64
called by 1: main calls 1: line
110func draw_char(fb: *i64, W: i64, H: i64, x: i64, y: i64, ch: i64, r: i64, gg: i64, b: i64, scale: i64) -> i64
131func 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
called by 1: main calls 1: draw_char
148func main(argc: i64, argv: *i64) -> i64