Re: [Inkscape-devel] Accessing individual nodes in a path
If you look at the SVG-DOM spec, instead of defining the nodes, they defines the path segments: http://www.w3.org/TR/SVG11/paths.html#DOMInterfaces
SVGElement implements SVGAnimatedPathData, which has getPathSegList() and its variants. And the list holds the segments, each of the subtypes of which has the node data.
bob
-----Original Message-----
From: Maximilian Albert <Anhalter42@...173...> Sent: May 21, 2008 9:20 AM To: inkscape inkscape-devel@lists.sourceforge.net Subject: [Inkscape-devel] Accessing individual nodes in a path
Hi,
for a couple of applications I have in mind it would be very desirable if one was able to access and refer to individual nodes in a path in a way that is unaffected by future insertion/deletion of other nodes (in much the same way as accessing the members of a linked list is unaffected by insertion/deletion of other elements).
How easy would it be to achieve this, especially considering the change of path representations to 2geom? What would be necessary to implement it? Can this be easily integrated into existing path representations?
Max
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Just thought I'd reply to my own msg here :-)
Of course I'm not suggesting that your data should implement this. However, you might consider making your data structure similar in shape, so that reading from/writing to an SVGPathElement would be easier and more natural.
bob
Bob Jamison wrote:
If you look at the SVG-DOM spec, instead of defining the nodes, they defines the path segments: http://www.w3.org/TR/SVG11/paths.html#DOMInterfaces
SVGElement implements SVGAnimatedPathData, which has getPathSegList() and its variants. And the list holds the segments, each of the subtypes of which has the node data.
participants (1)
-
Bob Jamison