diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-01-02 18:10:43 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-01-02 18:10:43 +0000 |
| commit | 4517038755f4211da3b5e9afb5567e9d608875da (patch) | |
| tree | 6b8c8407c5e099d449cb206a7d9077221bd4cc2e /src/sp-shape.cpp | |
| parent | add libnr <=> 2geom conversion helper headerfile (diff) | |
| download | inkscape-4517038755f4211da3b5e9afb5567e9d608875da.tar.gz inkscape-4517038755f4211da3b5e9afb5567e9d608875da.zip | |
+ Fix bug #179840, forking of LPEs
+ Groundwork for fixing transforming LPE bugs. TODO: implement the actual transformation of LPE parameters.
(bzr r4367)
Diffstat (limited to 'src/sp-shape.cpp')
| -rw-r--r-- | src/sp-shape.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp index f7c9f0e71..4b27ef8ba 100644 --- a/src/sp-shape.cpp +++ b/src/sp-shape.cpp @@ -9,6 +9,7 @@ * 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 */ @@ -1157,6 +1158,17 @@ sp_shape_get_livepatheffectobject(SPShape *shape) { } } +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 */ @@ -1219,6 +1231,14 @@ void sp_shape_set_path_effect(SPShape *shape, gchar *value) } } +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); |
