nx_manga_page.nx
buildroot/runtime/nx_manga_page.nx
about
nx_manga_page.nx -- R1 KEYSTONE of the mangagen lane (comparewatch- contracts mangagen_mp_page_emit
+ mangagen_mp_layout_rows): compose N input images onto ONE manga page PNG from a DATA-DRIVEN layout
row. Layouts are rows, never code (house law):
layouts.conf line: name|pageW|pageH|border|order|x,y,w,h;x,y,w,h;...
panel rects are PER-MILLE of the page; order rtl reverses the input->panel mapping (manga read
order); border = black frame thickness px drawn inside each panel rect.
FAIL-CLOSED: input count != panel count REFUSES (a page with empty or silently-dropped panels is a
wrong artifact wearing a clean filename); unknown layout REFUSES naming the conf and the ask.
Partition is PRINTED per the R1 accept rule: every input placed exactly once, panel<-input mapping.
usage: nx_manga_page <layouts.conf> <layout> <out.png> <img1> ... <imgN>
license_tier: ORIGINAL expect_exit: 0
dependencies 4 imports · 0 importers
imports: nx_str.nxnx_syscalls.nxnx_img_to_rgb.nxnx_png_write.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
| 16 | const MP_MAXP: i64 = 24 |
| 17 | const MP_CONFCAP: i64 = 65536 |
functions
| 18 | func mp_puts(s: *u8) -> i64 { sys_write(1, s, nx_str_len(s)); return 0 } |
| 19 | func mp_pi(v: i64) -> i64 |
| 32 | func mp_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 39 | func mp_int(buf: *u8, a: i64, b: i64) -> i64 called by 1: mp_layout_rows |
| 55 | func mp_layout_rows(confpath: *u8, name: *u8, meta: *i64, rects: *i64) -> i64 |
| 122 | func mp_draw(page: *u8, PW: i64, ox: i64, oy: i64, fw: i64, fh: i64, src: *u8, sw: i64, sh: i64) -> i64 called by 1: mp_page_emit |
| 164 | func mp_hline(page: *u8, PW: i64, x0: i64, x1: i64, y: i64) -> i64 called by 1: mp_page_emit |
| 169 | func mp_vline(page: *u8, PW: i64, x: i64, y0: i64, y1: i64) -> i64 called by 1: mp_page_emit |
| 177 | func mp_page_emit(meta: *i64, rects: *i64, paths: *i64, n: i64, outp: *u8) -> i64 |
| 234 | func main(argc: i64, argv: *i64) -> i64 |