2013/8/1 Vinícius dos Santos Oliveira <vini.ipsmaker@...400...>
** So, I reached a point where I know how the next steps can be implemented, but, differently from before, the next steps on libdepixelize can have a big impact on how it will be integrated on Inkscape. I decided it would be a good thing to discuss this matter with other developers.
Currently it's possible to represent simple paths on libdepixelize (see this https://plus.google.com/118295250366112843114/posts/Mpk1yLuMbEY), but to implement the full Kopf-Lischinski algorithm, I'll need to have paths with "holes" and I'll need to use complex path representations with enough expressive power to communicate things like "point start in A, then do a Bézier to C...". I don't want to create a new interface to represent paths, because this interface already exists and it's called SVG.
Inkscape represents paths using Geom::PathVector, which is a vector of Geom::Path. Geom::Path represents a single contiguous subpath, while Geom::PathVector corresponds to an SVG path. Geom::Path is a collection of Geom::Curve, a virtual class which has subclasses like Geom::BezierCurve, Geom::LineSegment, Geom::EllipticalArc, and so on.
You can read the docs by checking out the lib2geom source tree and running Doxygen, or inspecting the headers in src/2geom in Inkscape source.
Regards, Krzysztof