summaryrefslogtreecommitdiffstats
path: root/src/nodepath.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2009-03-05 22:45:47 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2009-03-05 22:45:47 +0000
commit3ec6ad49658abb7884139cbfe4d1f3767571e2b0 (patch)
tree7cfdd8b9b810f63313d23989e0f6f136f7ad4767 /src/nodepath.cpp
parentAllowed latex binaries to be detected by Inkscape on Mac OS X (diff)
downloadinkscape-3ec6ad49658abb7884139cbfe4d1f3767571e2b0.tar.gz
inkscape-3ec6ad49658abb7884139cbfe4d1f3767571e2b0.zip
generate flash helper path in node tool for all shapes and simple text objects
(bzr r7428)
Diffstat (limited to 'src/nodepath.cpp')
-rw-r--r--src/nodepath.cpp10
1 files 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;