summaryrefslogtreecommitdiffstats
path: root/src/xml/repr-util.cpp
diff options
context:
space:
mode:
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: