From 3192e5882e6a184521e6f656d53251e203f1e97b Mon Sep 17 00:00:00 2001 From: johanengelen Date: Thu, 5 Mar 2009 22:45:47 +0000 Subject: [PATCH] generate flash helper path in node tool for all shapes and simple text objects --- src/nodepath.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/nodepath.cpp b/src/nodepath.cpp index bd8dffc4e..318649e5f 100644 --- a/src/nodepath.cpp +++ b/src/nodepath.cpp @@ -45,7 +45,8 @@ #include "preferences.h" #include "sp-metrics.h" #include "sp-path.h" -#include "sp-rect.h" +#include "sp-text.h" +#include "sp-shape.h" #include "libnr/nr-matrix-ops.h" #include "svg/svg.h" #include "verbs.h" @@ -5060,9 +5061,10 @@ sp_nodepath_generate_helperpath(SPDesktop *desktop, SPItem *item) { SPCurve *curve = NULL; if (SP_IS_PATH(item)) { curve = sp_path_get_curve_for_edit(SP_PATH(item)); - } else if (SP_IS_RECT(item)) { - Geom::Rect rect = sp_rect_get_rect(SP_RECT(item)); - curve = SPCurve::new_from_rect(rect); + } else if ( SP_IS_SHAPE(item) && SP_SHAPE(item)->curve ) { + curve = sp_shape_get_curve (SP_SHAPE(item)); + } else if ( SP_IS_TEXT(item) ) { + curve = SP_TEXT(item)->getNormalizedBpath(); } else { g_warning ("-----> sp_nodepath_generate_helperpath(SPDesktop *desktop, SPItem *item): TODO: generate the helper path for this item type!\n"); return NULL; -- 2.30.2