From: Nathan H. <nj...@nj...> - 2014-07-20 00:33:48
|
Sounds good, does it close the closed path bug you found earlier? njh On Fri, Jul 18, 2014 at 10:43:40PM +0200, Krzysztof Kosiński wrote: > 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 > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > _______________________________________________ > Lib2geom-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/lib2geom-devel |