summaryrefslogtreecommitdiffstats
path: root/src/xml/repr-util.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2007-12-19 22:42:06 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2007-12-19 22:42:06 +0000
commit377be2b170e6d762bf3ee6bcb3901fc56a01bc26 (patch)
tree3d1ac62a1c9a353181b26701efd2fa12021fa300 /src/xml/repr-util.cpp
parentrename guide parameters to match snapping code naming convention. (diff)
downloadinkscape-377be2b170e6d762bf3ee6bcb3901fc56a01bc26.tar.gz
inkscape-377be2b170e6d762bf3ee6bcb3901fc56a01bc26.zip
guides: switch from using one position coordinate to Geom::Point point_on_line
(bzr r4258)
Diffstat (limited to 'src/xml/repr-util.cpp')
-rw-r--r--src/xml/repr-util.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/xml/repr-util.cpp b/src/xml/repr-util.cpp
index 693558cf7..560a70004 100644
--- a/src/xml/repr-util.cpp
+++ b/src/xml/repr-util.cpp
@@ -576,6 +576,17 @@ sp_repr_set_svg_double(Inkscape::XML::Node *repr, gchar const *key, double val)
return true;
}
+unsigned sp_repr_set_svg_point(Inkscape::XML::Node *repr, gchar const *key, Geom::Point val)
+{
+ g_return_val_if_fail(repr != NULL, FALSE);
+ g_return_val_if_fail(key != NULL, FALSE);
+
+ Inkscape::SVGOStringStream os;
+ os << val[Geom::X] << "," << val[Geom::Y];
+
+ repr->setAttribute(key, os.str().c_str());
+ return true;
+}
/*
Local Variables: