From: buliabyak Date: Tue, 30 May 2006 19:33:40 +0000 (+0000) Subject: fix writing clip/mask references X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8040d1843fc3eef24a79f87b5d5dbd1b9082572c;p=inkscape.git fix writing clip/mask references --- 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); }