diff options
| author | Martin Owens <doctormo@gmail.com> | 2013-04-21 01:03:36 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2013-04-21 01:03:36 +0000 |
| commit | 03e576fe99bb820f758ad3075459e43e26dff7f6 (patch) | |
| tree | 90e473b096773a6b4b2519f3fbb16ebe53a2b149 /src | |
| parent | Throw better error when attribute isn't available (diff) | |
| download | inkscape-03e576fe99bb820f758ad3075459e43e26dff7f6.tar.gz inkscape-03e576fe99bb820f758ad3075459e43e26dff7f6.zip | |
Output attributes as lengths instead of doubles.
Fixed bugs:
- https://launchpad.net/bugs/1107924
(bzr r12289)
Diffstat (limited to 'src')
| -rw-r--r-- | src/sp-use.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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(); |
