From aa3973adee525143989826b16d47c48c8d737cef Mon Sep 17 00:00:00 2001 From: Soren Berg Date: Mon, 17 Aug 2009 19:05:00 +0000 Subject: Fixed document_interface_line (Warning: I don't know why it works this way, it just does.) (bzr r8254.1.33) --- src/extension/dbus/document-interface.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/extension/dbus/document-interface.cpp') diff --git a/src/extension/dbus/document-interface.cpp b/src/extension/dbus/document-interface.cpp index 05dd2925e..ff691bab6 100644 --- a/src/extension/dbus/document-interface.cpp +++ b/src/extension/dbus/document-interface.cpp @@ -449,16 +449,14 @@ document_interface_ellipse (DocumentInterface *object, int x, int y, return document_interface_ellipse_center (object, x+rx, y+ry, rx, ry, error); } -/* FIXME: makes line but gets one endpoint wrong.*/ gchar* document_interface_line (DocumentInterface *object, int x, int y, int x2, int y2, GError **error) { Inkscape::XML::Node *newNode = dbus_create_node(object->desk, "svg:path"); std::stringstream out; - printf("X2: %d\nY2 %d\n", x2, y2); - out << "m " << x << "," << y << " " << x2 << "," << y2; - printf ("PATH: %s\n", out.str().c_str()); + // Not sure why this works. + out << "m " << x << "," << y << " " << x2 - x << "," << y2 - y; newNode->setAttribute("d", out.str().c_str()); return finish_create_shape (object, error, newNode, (gchar *)"create line"); } -- cgit v1.2.3