From 8040d1843fc3eef24a79f87b5d5dbd1b9082572c Mon Sep 17 00:00:00 2001 From: buliabyak Date: Tue, 30 May 2006 19:33:40 +0000 Subject: [PATCH] fix writing clip/mask references --- src/sp-item.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) 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); } -- 2.30.2