From 6ba273d25f2e2e2697d502eb9b56c10da96d7c1e Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Fri, 28 Mar 2008 19:13:14 +0000 Subject: - Created a SPLPEItem class that handles applying a LPE to an Item - LPEs can now be applied to groups - Updated the bend path to work properly with groups (bzr r5219) --- src/sp-item.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/sp-item.cpp') diff --git a/src/sp-item.cpp b/src/sp-item.cpp index fc966aff4..263671d47 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -1291,18 +1291,18 @@ 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) ) + if ( !SP_IS_LPE_ITEM(item) ) return; - SPShape *shape = SP_SHAPE (item); - if ( sp_shape_has_path_effect(shape) ) { - LivePathEffectObject *lpeobj = sp_shape_get_livepatheffectobject(shape); + SPLPEItem *lpeitem = SP_LPE_ITEM (item); + if ( sp_lpe_item_has_path_effect(lpeitem) ) { + LivePathEffectObject *lpeobj = sp_lpe_item_get_livepatheffectobject(lpeitem); LivePathEffectObject *new_lpeobj = lpeobj->fork_private_if_necessary(); if (new_lpeobj != lpeobj) { - sp_shape_set_path_effect(shape, new_lpeobj); + sp_lpe_item_set_path_effect(lpeitem, new_lpeobj); } - Inkscape::LivePathEffect::Effect * effect = sp_shape_get_livepatheffect(shape); + Inkscape::LivePathEffect::Effect * effect = sp_lpe_item_get_livepatheffect(lpeitem); if (effect) { effect->transform_multiply (to_2geom(postmul), set); } -- cgit v1.2.3