code wiki / (root) / nx_raster2d_lib.nx

nx_raster2d_lib.nx

buildroot/runtime/nx_raster2d_lib.nx

7266 B194 linesdepth 5pulls 6 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_raster2d_lib.nx -- shared 2D raster primitives on an i64 framebuffer (one i64/pixel, packed R + G*256 + B*65536, the nx_png.write_png contract). Extracted VERBATIM from the gate-proven nx_eco_graph_png (2026-07-16, byte-identical output gate) so the lineage renderer and the whole-forest renderer share ONE implementation. Composes nx_font_bitmap_5x7 for text. license_tier: ORIGINAL

dependencies 3 imports · 1 importers

nx_syscalls.nx nx_eco_graph.nx nx_font_bitmap_5x7.nx nx_raster2d_lib.nx nx_eco_graph_forest.nx

imports: nx_syscalls.nxnx_eco_graph.nxnx_font_bitmap_5x7.nx

imported by: nx_eco_graph_forest.nx

structs

none

consts

9const K_MAGIC_65536: i64 = 65536
10const K_MAGIC_6000: i64 = 6000

functions

12func r2_px(fb: *i64, W: i64, H: i64, x: i64, y: i64, r: i64, gg: i64, b: i64) -> i64
20func r2_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: r2_px
25func r2_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: r2_px
37func r2_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: r2_px
52func r2_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: r2_ribbon calls 1: r2_px
74func r2_px_add(fb: *i64, W: i64, H: i64, x: i64, y: i64, dr: i64, dg: i64, db: i64) -> i64
called by 1: r2_line_add
89func r2_line_add(fb: *i64, W: i64, H: i64, x0: i64, y0: i64, x1: i64, y1: i64, dr: i64, dg: i64, db: i64) -> i64
called by 1: r2_ribbon_add calls 1: r2_px_add
109func r2_ribbon_add(fb: *i64, W: i64, H: i64, x1: i64, y1: i64, x2: i64, y2: i64, dr: i64, dg: i64, db: i64) -> i64
called by 1: main calls 1: r2_line_add
134func r2_ribbon(fb: *i64, W: i64, H: i64, x1: i64, y1: i64, x2: i64, y2: i64, r: i64, gg: i64, b: i64) -> i64
calls 1: r2_line
158func r2_char(fb: *i64, W: i64, H: i64, x: i64, y: i64, ch: i64, r: i64, gg: i64, b: i64, scale: i64) -> i64
179func r2_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: r2_char