nx_raster2d_lib.nx
buildroot/runtime/nx_raster2d_lib.nx
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
imports: nx_syscalls.nxnx_eco_graph.nxnx_font_bitmap_5x7.nx
imported by: nx_eco_graph_forest.nx
structs
| none |
consts
| 9 | const K_MAGIC_65536: i64 = 65536 |
| 10 | const K_MAGIC_6000: i64 = 6000 |
functions
| 12 | func r2_px(fb: *i64, W: i64, H: i64, x: i64, y: i64, r: i64, gg: i64, b: i64) -> i64 |
| 20 | func r2_fill_rect(fb: *i64, W: i64, H: i64, x0: i64, y0: i64, w: i64, h: i64, r: i64, gg: i64, b: i64) -> i64 |
| 25 | func r2_fill_disk(fb: *i64, W: i64, H: i64, cx: i64, cy: i64, rad: i64, r: i64, gg: i64, b: i64) -> i64 |
| 37 | func r2_ring(fb: *i64, W: i64, H: i64, cx: i64, cy: i64, rad: i64, r: i64, gg: i64, b: i64) -> i64 |
| 52 | func r2_line(fb: *i64, W: i64, H: i64, x0: i64, y0: i64, x1: i64, y1: i64, r: i64, gg: i64, b: i64) -> i64 |
| 74 | func 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 |
| 89 | func r2_line_add(fb: *i64, W: i64, H: i64, x0: i64, y0: i64, x1: i64, y1: i64, dr: i64, dg: i64, db: i64) -> i64 |
| 109 | func r2_ribbon_add(fb: *i64, W: i64, H: i64, x1: i64, y1: i64, x2: i64, y2: i64, dr: i64, dg: i64, db: i64) -> i64 |
| 134 | func 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 |
| 158 | func r2_char(fb: *i64, W: i64, H: i64, x: i64, y: i64, ch: i64, r: i64, gg: i64, b: i64, scale: i64) -> i64 |
| 179 | func 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 |