From 377be2b170e6d762bf3ee6bcb3901fc56a01bc26 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Wed, 19 Dec 2007 22:42:06 +0000 Subject: guides: switch from using one position coordinate to Geom::Point point_on_line (bzr r4258) --- src/xml/repr-util.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/xml/repr-util.cpp') 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: -- cgit v1.2.3