Code

make sure thinning uses updated pressure; make the response a bit nonlinear
[inkscape.git] / src / sp-rect.cpp
index edcea21a24cd757af5bfb77e28a2474ae9d61e37..6823f21229dca2aa254e9c291881538aeabe6593 100644 (file)
@@ -22,6 +22,7 @@
 #include <libnr/nr-matrix-div.h>
 #include <libnr/nr-matrix-fns.h>
 
+#include "document.h"
 #include "attributes.h"
 #include "style.h"
 #include "sp-rect.h"
@@ -210,7 +211,8 @@ sp_rect_write(SPObject *object, Inkscape::XML::Node *repr, guint flags)
     SPRect *rect = SP_RECT(object);
 
     if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
-        repr = sp_repr_new("svg:rect");
+        Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object));
+        repr = xml_doc->createElement("svg:rect");
     }
 
     sp_repr_set_svg_double(repr, "width", rect->width.computed);