diff options
Diffstat (limited to 'src/sp-item.cpp')
| -rw-r--r-- | src/sp-item.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/sp-item.cpp b/src/sp-item.cpp index f064b246c..90765fc94 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -58,12 +58,16 @@ #include "libnr/nr-matrix-translate-ops.h" #include "libnr/nr-scale-translate-ops.h" #include "libnr/nr-translate-scale-ops.h" +#include "libnr/nr-convert2geom.h" #include "algorithms/find-last-if.h" #include "util/reverse-list.h" #include "xml/repr.h" #include "extract-uri.h" +#include "live_effects/lpeobject.h" +#include "live_effects/effect.h" + #define noSP_ITEM_DEBUG_IDLE static void sp_item_class_init(SPItemClass *klass); @@ -1155,6 +1159,27 @@ sp_item_adjust_paint_recursive (SPItem *item, NR::Matrix advertized_transform, N } +void +sp_item_adjust_livepatheffect (SPItem *item, NR::Matrix const &postmul, bool set) +{ + if ( !SP_IS_SHAPE(item) ) + return; + + SPShape *shape = SP_SHAPE (item); + if ( sp_shape_has_path_effect(shape) ) { + LivePathEffectObject *lpeobj = sp_shape_get_livepatheffectobject(shape); + LivePathEffectObject *new_lpeobj = lpeobj->fork_private_if_necessary(); + if (new_lpeobj != lpeobj) { + sp_shape_set_path_effect(shape, new_lpeobj); + } + + Inkscape::LivePathEffect::Effect * effect = sp_shape_get_livepatheffect(shape); + if (effect) { + effect->transform_multiply (to_2geom(postmul), set); + } + } +} + /** * A temporary wrapper for the next function accepting the NRMatrix * instead of NR::Matrix |
