From c44173a5bb8a1c0ae9b89fed53701deb246e2d03 Mon Sep 17 00:00:00 2001 From: glimmer07 Date: Tue, 21 Jul 2009 17:50:12 +0000 Subject: [PATCH] worked on path parsing. --- src/extension/dbus/document-interface.cpp | 5 ++++- src/extension/dbus/document-interface.xml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/extension/dbus/document-interface.cpp b/src/extension/dbus/document-interface.cpp index a28bb92fa..9a900e0ee 100644 --- a/src/extension/dbus/document-interface.cpp +++ b/src/extension/dbus/document-interface.cpp @@ -52,6 +52,9 @@ SPObject * get_object_by_name (SPDesktop *desk, gchar *name) { return sp_desktop_document(desk)->getObjectById(name); + /* ALTERNATIVE (is this faster if only repr is needed?) + Inkscape::XML::Node *newnode = sp_repr_lookup_name((doc->root)->repr, name); + */ } const gchar * @@ -584,7 +587,7 @@ document_interface_get_node_coordinates (DocumentInterface *object, gchar *shape if (shapenode == NULL || shapenode->attribute("d") == NULL) { return FALSE; } - const char * path = strdup(shapenode->attribute("d")); + char * path = strdup(shapenode->attribute("d")); printf("PATH: %s\n", path); Geom::parse_svg_path (path); diff --git a/src/extension/dbus/document-interface.xml b/src/extension/dbus/document-interface.xml index 7126887af..37749c932 100644 --- a/src/extension/dbus/document-interface.xml +++ b/src/extension/dbus/document-interface.xml @@ -578,7 +578,7 @@ - Get the path value of an object. Equivilent to calling get_attribte() with argument "d". Will not turn object into a path if it is not already. + Get the path value of an object. Equivilent to calling get_attribte() with argument "d". Will not turn object into a path if it is not already. Paths -- 2.30.2