From: Krzysztof K. <twe...@gm...> - 2014-07-18 20:43:49
|
Hello Right now, methods such as end_closed() and end_open() determine which segments to include only by looking at the closed flag. However, this makes little sense - if the path contains a closing segment which is degenerate, i.e. has exactly zero length, because the last real segment is a Bezier curve, the iteration will needlessly include it. In order to be able to faithfully represent closed paths where the last segment is not linear, the closing segment should be included in the range returned by [begin(), end_default()] only when: 1. the path is closed, 2. the closing segment is non-degenerate (initialPoint() != finalPoint(), tested with exact comparison). By doing this and using an SVG path data writer that writes out the last non-linear segment in absolute coordinates when it closes the path, we can have perfect roundtrip between 2Geom paths and SVG. What do you think of this change? Regards, Krzysztof |