summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f71a1d8)
raw | patch | inline | side by side (parent: f71a1d8)
author | glimmer07 <glimmer07@users.sourceforge.net> | |
Mon, 17 Aug 2009 19:05:00 +0000 (19:05 +0000) | ||
committer | glimmer07 <glimmer07@users.sourceforge.net> | |
Mon, 17 Aug 2009 19:05:00 +0000 (19:05 +0000) |
(Warning: I don't know why it works this way, it just does.)
src/extension/dbus/Notes.txt | patch | blob | history | |
src/extension/dbus/document-interface.cpp | patch | blob | history |
index d7c34aac01d2834507fbf97033a124c0857e6f4e..25c3f35b5994ab31540f4cac4e8833ad18694ab2 100644 (file)
*The following do not behave like the documentation:
-document_interface_transform
-document_interface_text
- -document_interface_line
EFFICIENCY:
*Need better way to retrieve objects by name.
index 05dd2925e01d885ae614db22a88eed9c1f8d2a7a..ff691bab6c7d22c8554225649627b4f6e70f8912 100644 (file)
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");
}