From a554ab3073df4f870a8b103137225d2cbe64b4ac Mon Sep 17 00:00:00 2001 From: bulia byak Date: Tue, 30 May 2006 19:33:40 +0000 Subject: fix writing clip/mask references (bzr r1088) --- src/sp-item.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/sp-item.cpp') 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); } -- cgit v1.2.3