From 76268cdf97916d0de571586ff1111b90c1a65286 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sat, 9 May 2015 00:04:46 +0200 Subject: fixes various bugs with clipping and masking Fixed bugs: - https://launchpad.net/bugs/569281 - https://launchpad.net/bugs/1319171 - https://launchpad.net/bugs/1177650 (bzr r14130) --- src/sp-clippath.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/sp-clippath.cpp') diff --git a/src/sp-clippath.cpp b/src/sp-clippath.cpp index 3c6167438..0c13ca80d 100644 --- a/src/sp-clippath.cpp +++ b/src/sp-clippath.cpp @@ -313,8 +313,7 @@ const gchar *SPClipPath::create (GSList *reprs, SPDocument *document, Geom::Affi SPItem *item = SP_ITEM(clip_path_object->appendChildRepr(node)); if (NULL != applyTransform) { - Geom::Affine transform (item->transform); - transform *= (*applyTransform); + Geom::Affine transform (item->transform * (*applyTransform)); item->doWriteTransform(item->getRepr(), transform); } } -- cgit v1.2.3 From 7cb183695ed9eec9fb3e08045e4a265d10eca76e Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sat, 9 May 2015 01:05:06 +0200 Subject: refactor sp_selection_set_mask (bzr r14131) --- src/sp-clippath.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/sp-clippath.cpp') diff --git a/src/sp-clippath.cpp b/src/sp-clippath.cpp index 0c13ca80d..d66508eae 100644 --- a/src/sp-clippath.cpp +++ b/src/sp-clippath.cpp @@ -296,7 +296,7 @@ sp_clippath_view_list_remove(SPClipPathView *list, SPClipPathView *view) } // Create a mask element (using passed elements), add it to -const gchar *SPClipPath::create (GSList *reprs, SPDocument *document, Geom::Affine const* applyTransform) +const gchar *SPClipPath::create (std::vector &reprs, SPDocument *document, Geom::Affine const* applyTransform) { Inkscape::XML::Node *defsrepr = document->getDefs()->getRepr(); @@ -308,8 +308,8 @@ const gchar *SPClipPath::create (GSList *reprs, SPDocument *document, Geom::Affi const gchar *id = repr->attribute("id"); SPObject *clip_path_object = document->getObjectById(id); - for (GSList *it = reprs; it != NULL; it = it->next) { - Inkscape::XML::Node *node = (Inkscape::XML::Node *)(it->data); + for (std::vector::const_iterator it = reprs.begin(); it != reprs.end(); it++) { + Inkscape::XML::Node *node = (*it); SPItem *item = SP_ITEM(clip_path_object->appendChildRepr(node)); if (NULL != applyTransform) { -- cgit v1.2.3