diff options
| author | Alvin Penner <penner@vaxxine.com> | 2014-09-19 21:47:25 +0000 |
|---|---|---|
| committer | apenner <penner@vaxxine.com> | 2014-09-19 21:47:25 +0000 |
| commit | 44d5ffff67f726c355a28492a427a55d6e6387fd (patch) | |
| tree | 63cd10b6c65b2d57e88c9a5adf22b41d6f1901df /src | |
| parent | scale clip or mask upon unit change (Bug 1287288) (diff) | |
| download | inkscape-44d5ffff67f726c355a28492a427a55d6e6387fd.tar.gz inkscape-44d5ffff67f726c355a28492a427a55d6e6387fd.zip | |
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)
Diffstat (limited to 'src')
| -rw-r--r-- | src/sp-item-group.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
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) { |
