code wiki / (root) / nx_paint_walk_layout_test.nx

nx_paint_walk_layout_test.nx

buildroot/runtime/nx_paint_walk_layout_test.nx

6492 B178 linesdepth 7pulls 13 transitivereach 0 importersview sourcekind gate/prooftopic paint
docsdependenciesstructsconstsfunctions

about

nx_paint_walk_layout_test.nx -- end-to-end integration smoke for the bits-up rendering pipeline. Builds a layout tree by hand (since nx_layout_from_dom is queued), populates a cascade with background-color declarations per box, walks the tree to paint, and verifies framebuffer pixels match the expected coloring. Tree: root at (0, 0, 32, 32) with background-color: #00ff00 (green) child at (4, 8, 16, 12) with background-color: #ff00ff (magenta) Expected rendering (document-order paint: root first, child OVER): pixel (1, 1) -> green pixel (10, 10) -> magenta (inside child) pixel (28, 28) -> green (outside child but inside root) pixel (4, 8) -> magenta (top-left of child) pixel (19, 19) -> magenta (bottom-right of child = 4+15, 8+11)

dependencies 7 imports · 0 importers

nx_syscalls.nx nx_css_tokenize.nx nx_css_apply.nx nx_css_color_decode.nx nx_layout_box.nx nx_paint_solid_rect.nx nx_paint_walk_layout.nx nx_paint_walk_layout_test.nx

imports: nx_syscalls.nxnx_css_tokenize.nxnx_css_apply.nxnx_css_color_decode.nxnx_layout_box.nxnx_paint_solid_rect.nxnx_paint_walk_layout.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap _put_byte nx_layout_tree_init nx_layout_box_append _layout_box_at nx_layout_box_attach_child _layout_box_at ↻ nx_framebuffer_init nx_framebuffer_clear nx_paint_prop_table_init _paint_put_byte nx_paint_ctx_init nx_paint_walk_layout _paint_display_none _paint_box_background sys_mmap ↻ _paint_lookup_decl _paint_bytes_equal nx_css_color_decode _css_color_hex_digit _css_color_hex_pair _css_color_hex_digit ↻ nx_css_color_named _ccn_eq _ccn_set nx_css_color_rgb_func sys_mmap ↻ _ccr_next_uint _ccr_alpha _paint_lookup_bg _bg_extract_color nx_css_color_decode ↻ nx_css_color_named ↻ nx_css_color_rgb_func ↻ nx_paint_solid_rect _paint_box_border _paint_border_lookup sys_mmap ↻ _hex_is

structs

none

consts

none

functions

26func _put_byte(buf: *u8, i: i64, v: i64) -> i64
called by 1: main
31func main() -> i64