| 4560 | enum NodeType {ntAny, ntOpen, ntClosed}; |
| 4561 | |
| 4562 | void AddPolyNodeToPaths(const PolyNode& polynode, NodeType nodetype, Paths& paths) |
| 4563 | { |
| 4564 | bool match = true; |
| 4565 | if (nodetype == ntClosed) match = !polynode.IsOpen(); |
| 4566 | else if (nodetype == ntOpen) return; |
| 4567 | |
| 4568 | if (!polynode.Contour.empty() && match) |
| 4569 | paths.push_back(polynode.Contour); |
| 4570 | for (int i = 0; i < polynode.ChildCount(); ++i) |
| 4571 | AddPolyNodeToPaths(*polynode.Childs[i], nodetype, paths); |
| 4572 | } |
| 4573 | //------------------------------------------------------------------------------ |
| 4574 | |
| 4575 | void PolyTreeToPaths(const PolyTree& polytree, Paths& paths) |
no test coverage detected