From 44d5ffff67f726c355a28492a427a55d6e6387fd Mon Sep 17 00:00:00 2001 From: Alvin Penner Date: Fri, 19 Sep 2014 17:47:25 -0400 Subject: improved version of rev 13561, to allow transforming both clip and mask on the same group Fixed bugs: - https://launchpad.net/bugs/1287288 (bzr r13562) --- src/sp-item-group.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp index a24056630..b65be8f22 100644 --- a/src/sp-item-group.cpp +++ b/src/sp-item-group.cpp @@ -680,7 +680,15 @@ void SPGroup::scaleChildItemsRec(Geom::Scale const &sc, Geom::Point const &p, bo SPItem *item = NULL; if (SP_ITEM(o)->clip_ref->getObject()) { item = SP_ITEM(SP_ITEM(o)->clip_ref->getObject()->firstChild()); - } else if (SP_ITEM(o)->mask_ref->getObject()) { + } + if (item != NULL) { + Geom::Affine tdoc2dt = Geom::Scale(1, -1) * Geom::Translate(p); // re-create doc2dt() + Geom::Affine ti2doc = SP_ITEM(o)->i2doc_affine(); + item->set_i2d_affine(ti2doc * sc * ti2doc.inverse() * tdoc2dt); + item->doWriteTransform(item->getRepr(), item->transform, NULL, true); + } + item = NULL; + if (SP_ITEM(o)->mask_ref->getObject()) { item = SP_ITEM(SP_ITEM(o)->mask_ref->getObject()->firstChild()); } if (item != NULL) { -- cgit v1.2.3 From 363a3075b59439f9845412e9bb678ac759794753 Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Tue, 23 Sep 2014 08:43:33 +0200 Subject: Extensions. Fix for Bug #1372200 (Comment within