From 03e576fe99bb820f758ad3075459e43e26dff7f6 Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Sat, 20 Apr 2013 21:03:36 -0400 Subject: Output attributes as lengths instead of doubles. Fixed bugs: - https://launchpad.net/bugs/1107924 (bzr r12289) --- src/sp-use.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/sp-use.cpp') diff --git a/src/sp-use.cpp b/src/sp-use.cpp index d5b3c004a..6fd7c6970 100644 --- a/src/sp-use.cpp +++ b/src/sp-use.cpp @@ -30,6 +30,7 @@ #include "uri.h" #include "print.h" #include "xml/repr.h" +#include "svg/svg.h" #include "preferences.h" #include "style.h" #include "sp-symbol.h" @@ -238,8 +239,9 @@ sp_use_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML:: sp_repr_set_svg_double(repr, "x", use->x.computed); sp_repr_set_svg_double(repr, "y", use->y.computed); - sp_repr_set_svg_double(repr, "width", use->width.computed); - sp_repr_set_svg_double(repr, "height", use->height.computed); + + repr->setAttribute("width", sp_svg_length_write_with_units(use->width).c_str()); + repr->setAttribute("height", sp_svg_length_write_with_units(use->height).c_str()); if (use->ref->getURI()) { gchar *uri_string = use->ref->getURI()->toString(); -- cgit v1.2.3