From: Krzysztof K. <twe...@gm...> - 2013-11-13 19:58:18
|
2013/11/13 Johan Engelen <jbc...@sw...>: > Wow, I didn't realize that it's only the HL and VL curve types. > Not being able to transform Curves without creating a new copy is a very > high price to pay for HL and VL... I agree. On the whole, path handling in 2Geom may require some redesign: 1. There is a hard requirement that the final point of a segment and the initial point of the next segment in a Geom::Path must coincide exactly, but each curve stores both the initial point and the final point. For paths that contain many linear segments we store a lot of duplicate points. We could think about storing the path data separately in a more efficient representation and using the Curve-derived objects only as an interface. 2. The copy-on-write thing currently in Path should probably be moved to the PathVector level, and Path itself should be based on boost::ptr_vector or some other pointer container. 3. Path needs to be renamed to Subpath and PathVector needs to become a real object and be renamed to Path. > What shall we do? > I thought Inkscape wants HLineSegment / VLineSegment to be able to fully > round-trip SVG-d, but when I manually enter H or V in the XML-editor, it is > immediately converted to normal line segments... SVG roundtrip does not strictly require having HLine / VLine as separate classes. For instance, there could be a flag set in the constructor. Regards, Krzysztof |