summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1bfbb0f)
raw | patch | inline | side by side (parent: 1bfbb0f)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Mon, 20 Mar 2006 04:24:12 +0000 (04:24 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Mon, 20 Mar 2006 04:24:12 +0000 (04:24 +0000) |
src/selection-chemistry.cpp | patch | blob | history |
index a92cb1a73d8eff147d5aafe8e19f50067c0b811a..91686d277f6c7751fef4629f500893d91b58bce4 100644 (file)
}
}
-void sp_copy_marker (GSList **defs_clip, SPMarker *marker)
+void sp_copy_single (GSList **defs_clip, SPObject *thing)
{
- Inkscape::XML::Node *marker_repr = SP_OBJECT_REPR(marker)->duplicate();
- *defs_clip = g_slist_prepend (*defs_clip, marker_repr);
+ Inkscape::XML::Node *duplicate_repr = SP_OBJECT_REPR(thing)->duplicate();
+ *defs_clip = g_slist_prepend (*defs_clip, duplicate_repr);
}
SPShape *shape = SP_SHAPE (item);
for (int i = 0 ; i < SP_MARKER_LOC_QTY ; i++) {
if (shape->marker[i]) {
- sp_copy_marker (defs_clip, SP_MARKER (shape->marker[i]));
+ sp_copy_single (defs_clip, SP_OBJECT (shape->marker[i]));
}
}
}
@@ -893,6 +893,20 @@ void sp_copy_stuff_used_by_item (GSList **defs_clip, SPItem *item, const GSList
sp_copy_textpath_path (defs_clip, SP_TEXTPATH(sp_object_first_child(SP_OBJECT(item))), items);
}
+ if (item->clip_ref->getObject()) {
+ sp_copy_single (defs_clip, item->clip_ref->getObject());
+ }
+
+ if (item->mask_ref->getObject()) {
+ SPObject *mask = item->mask_ref->getObject();
+ sp_copy_single (defs_clip, mask);
+ // recurse into the mask for its gradients etc.
+ for (SPObject *o = SP_OBJECT(mask)->children; o != NULL; o = o->next) {
+ if (SP_IS_ITEM(o))
+ sp_copy_stuff_used_by_item (defs_clip, SP_ITEM (o), items);
+ }
+ }
+
// recurse
for (SPObject *o = SP_OBJECT(item)->children; o != NULL; o = o->next) {
if (SP_IS_ITEM(o))