Merge lp:~ado-papas/inkscape/bug_898797 into lp:~inkscape.dev/inkscape/trunk

Proposed by Adonis Papaderos
Status: Merged
Merged at revision: 12539
Proposed branch: lp:~ado-papas/inkscape/bug_898797
Merge into: lp:~inkscape.dev/inkscape/trunk
Diff against target: 13 lines (+2/-0)
1 file modified
src/sp-item-group.cpp (+2/-0)
To merge this branch: bzr merge lp:~ado-papas/inkscape/bug_898797
Reviewer Review Type Date Requested Status
Johan Engelen Approve
Review via email: mp+118326@code.launchpad.net

Description of the change

This is a 2 line hack to fix bug 898797 "Bend LPE incorrect on groups with objects which have a preserved transformation.

It applies the transformation of the subitem relative to the group to the curve before applying the effect, and then it's inverse to remove it from the output curve.

Please note that I'm not confident that it is the best solution and dont know whether someone else has been working on this. It just works for my test cases.

Thanks Adonis

To post a comment you must log in.
Revision history for this message
Johan Engelen (johanengelen) wrote :

thanks for your patch, seems good to me!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/sp-item-group.cpp'
2--- src/sp-item-group.cpp 2012-05-04 15:38:10 +0000
3+++ src/sp-item-group.cpp 2012-08-06 10:16:20 +0000
4@@ -853,7 +853,9 @@
5 }
6 // only run LPEs when the shape has a curve defined
7 if (c) {
8+ c->transform(i2anc_affine(subitem, topgroup));
9 sp_lpe_item_perform_path_effect(SP_LPE_ITEM(topgroup), c);
10+ c->transform(i2anc_affine(subitem, topgroup).inverse());
11 SP_SHAPE(subitem)->setCurve(c, TRUE);
12
13 if (write) {