summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 080297a)
raw | patch | inline | side by side (parent: 080297a)
| author | gustav_b <gustav_b@users.sourceforge.net> | |
| Fri, 29 Dec 2006 01:48:12 +0000 (01:48 +0000) | ||
| committer | gustav_b <gustav_b@users.sourceforge.net> | |
| Fri, 29 Dec 2006 01:48:12 +0000 (01:48 +0000) |
| src/splivarot.cpp | patch | blob | history |
diff --git a/src/splivarot.cpp b/src/splivarot.cpp
index 60d6113ac193bcb97b99703fe2c1f05eb2b8900d..1d0e4e7dfc446b3ba41b5fb41e4a92deb1fd8504 100644 (file)
--- a/src/splivarot.cpp
+++ b/src/splivarot.cpp
@@ -414,22 +414,37 @@ sp_selected_path_boolop(bool_op bop, const unsigned int verb, const Glib::ustrin
return;
}
- // remember important aspects of the source path, to be restored
- Inkscape::XML::Node *repr_source;
+ // get the source path object
+ SPObject *source;
if ( bop == bool_op_diff || bop == bool_op_symdiff || bop == bool_op_cut || bop == bool_op_slice ) {
if (reverseOrderForOp) {
- repr_source = SP_OBJECT_REPR(il->data);
+ source = SP_OBJECT(il->data);
} else {
- repr_source = SP_OBJECT_REPR(il->next->data);
+ source = SP_OBJECT(il->next->data);
}
} else {
// find out the bottom object
GSList *sorted = g_slist_copy((GSList *) selection->reprList());
sorted = g_slist_sort(sorted, (GCompareFunc) sp_repr_compare_position);
- repr_source = ((Inkscape::XML::Node *) sorted->data);
+
+ source = sp_desktop_document(desktop)->
+ getObjectByRepr((Inkscape::XML::Node *)sorted->data);
+
g_slist_free(sorted);
}
+
+ // adjust style properties that depend on a possible transform in the source object in order
+ // to get a correct style attribute for the new path
+ SPItem* item_source = SP_ITEM(source);
+ NR::Matrix i2d = sp_item_i2d_affine(item_source);
+ sp_item_adjust_stroke(item_source, i2d.expansion());
+ sp_item_adjust_pattern(item_source, i2d);
+ sp_item_adjust_gradient(item_source, i2d);
+
+ Inkscape::XML::Node *repr_source = SP_OBJECT_REPR(source);
+
+ // remember important aspects of the source path, to be restored
gint pos = repr_source->position();
Inkscape::XML::Node *parent = sp_repr_parent(repr_source);
gchar const *id = repr_source->attribute("id");
@@ -437,7 +452,6 @@ sp_selected_path_boolop(bool_op bop, const unsigned int verb, const Glib::ustrin
gchar const *mask = repr_source->attribute("mask");
gchar const *clip_path = repr_source->attribute("clip-path");
-
// remove source paths
selection->clear();
for (GSList *l = il; l != NULL; l = l->next) {