summaryrefslogtreecommitdiffstats
path: root/src/sp-item.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp-item.cpp')
-rw-r--r--src/sp-item.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index 3d71443d6..401af10b6 100644
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
@@ -691,6 +691,17 @@ sp_item_write(SPObject *const object, Inkscape::XML::Node *repr, guint flags)
repr->setAttribute ("inkscape:transform-center-y", NULL);
}
+ if (item->clip_ref->getObject()) {
+ const gchar *value = g_strdup_printf ("url(%s)", item->clip_ref->getURI()->toString());
+ repr->setAttribute ("clip-path", value);
+ g_free ((void *) value);
+ }
+ if (item->mask_ref->getObject()) {
+ const gchar *value = g_strdup_printf ("url(%s)", item->mask_ref->getURI()->toString());
+ repr->setAttribute ("mask", value);
+ g_free ((void *) value);
+ }
+
if (((SPObjectClass *) (parent_class))->write) {
((SPObjectClass *) (parent_class))->write(object, repr, flags);
}