2012/1/16 Maximilian Albert <maximilian.albert@...1439...>:
Hi all!
After a long break I just had a quick play-around with some of the Inkscape code. At some point I needed to traverse the nodes of the selected path in the order in which they appar along the path, but I couldn't find out how to do it in the limited time I was able to spend. What's the correct/recommended way of doing this? Are there some examples on the wiki or somewhere else?
You need to get a PathVector and iterate over segments rather than nodes. If you need the types of nodes too, you could reuse the code in ui/tool/path-manipulator.cpp that contains a conversion from the path + nodestring data to a node-based representation (I think the function is called _createControlPointsFromGeometry())
Regards, Krzysztof