Thanks to the author for contributing this library. While reading the source code, I found this comment. Why do we need to process the sibling nodes first?
let mut node_stack = tree
.root()
.children()
.iter()
// to make sure we are processing the svg with sibling > descendant priority we reverse it
// and reverse the resulting descriptors before returning the final constructed svg
.rev()
.map(|node| NodeContext {
node,
transform: node.abs_transform(),
is_text: false,
})
.collect::<VecDeque<_>>();