Skip to main content

marks_for_nodes

Function marks_for_nodes 

Source
pub fn marks_for_nodes(root: &UiNode, map: &ScreenshotMap) -> Vec<MarkBox>
Expand description

Numbered boxes for every node of root whose frame lands inside map.

Element frames are in screen points while map describes the pixels of one capture, so every frame goes through [screen_rect_to_image]. A node with no frame contributes no box but its children are still walked: a frameless group must never hide the subtree below it.

Indices mirror crate::tree::render exactly — same preorder, same CHILD_CAP / DEPTH_CAP / LINE_CAP budget — so the number drawn on the image is the number tree prints for that element.