diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp
index f7c9f0e71b4460725f544f9716c31735f6b4446d..4b27ef8ba870c289e763bcc0481db13fd0bafc43 100644 (file)
--- a/src/sp-shape.cpp
+++ b/src/sp-shape.cpp
* Copyright (C) 1999-2002 Lauris Kaplinski
* Copyright (C) 2000-2001 Ximian, Inc.
* Copyright (C) 2004 John Cliff
+ * Copyright (C) 2007-2008 Johan Engelen
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
}
}
+Inkscape::LivePathEffect::Effect *
+sp_shape_get_livepatheffect(SPShape *shape) {
+ if (!shape) return NULL;
+
+ LivePathEffectObject * lpeobj = sp_shape_get_livepatheffectobject(shape);
+ if (lpeobj)
+ return lpeobj->lpe;
+ else
+ return NULL;
+}
+
/**
* Calls any registered handlers for the update_patheffect action
*/
}
}
+void sp_shape_set_path_effect(SPShape *shape, LivePathEffectObject * new_lpeobj)
+{
+ const gchar * repr_id = SP_OBJECT_REPR(new_lpeobj)->attribute("id");
+ gchar *hrefstr = g_strdup_printf("#%s", repr_id);
+ sp_shape_set_path_effect(shape, hrefstr);
+ g_free(hrefstr);
+}
+
void sp_shape_remove_path_effect(SPShape *shape)
{
Inkscape::XML::Node *repr = SP_OBJECT_REPR(shape);