diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-08-14 22:11:41 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-08-14 22:11:41 +0000 |
| commit | 555a04a4d000896b6d02f59e238c01165312de39 (patch) | |
| tree | 87a83a260bfd85b886c3f2fa8a1013a3d1b342b6 /src | |
| parent | Attemp to fix bug 1707899, retain shapes color. Also now retain shape previou... (diff) | |
| download | inkscape-555a04a4d000896b6d02f59e238c01165312de39.tar.gz inkscape-555a04a4d000896b6d02f59e238c01165312de39.zip | |
Fix a bug on LPE powerclip when using a shape with transform as clip
Diffstat (limited to 'src')
| -rw-r--r-- | src/live_effects/lpe-powerclip.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/live_effects/lpe-powerclip.cpp b/src/live_effects/lpe-powerclip.cpp index 2d0d4bb12..43faa35e0 100644 --- a/src/live_effects/lpe-powerclip.cpp +++ b/src/live_effects/lpe-powerclip.cpp @@ -71,6 +71,7 @@ LPEPowerClip::doBeforeEffect (SPLPEItem const* lpeitem){ Inkscape::XML::Node *clip_path_node = sp_selected_item_to_curved_repr(SP_ITEM(clip_data), 0); // remember the position of the item gint pos = clip_data->getRepr()->position(); + Geom::Affine affine = SP_ITEM(clip_data)->transform; // remember parent Inkscape::XML::Node *parent = clip_data->getRepr()->parent(); // remember id @@ -85,9 +86,24 @@ LPEPowerClip::doBeforeEffect (SPLPEItem const* lpeitem){ // restore id clip_path_node->setAttribute("id", id); + // add the new repr to the parent parent->appendChild(clip_path_node); clip_to_path = document->getObjectByRepr(clip_path_node); + + // transform position + SPCurve * c = NULL; + c = SP_SHAPE(clip_to_path)->getCurve(); + if (c) { + Geom::PathVector c_pv = c->get_pathvector(); + c_pv *= affine; + c->set_pathvector(c_pv); + SP_SHAPE(clip_to_path)->setCurve(c, TRUE); + c->unref(); + } + + clip_path_node->setAttribute("transform", NULL); + if (title && clip_to_path) { clip_to_path->setTitle(title); g_free(title); |
