diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-06-06 01:43:35 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-06-06 01:43:35 +0000 |
| commit | 8a38c52bce619b07117cdd87a183eb05fb51e28e (patch) | |
| tree | 39b9f2af1ce9df43884a3b33ca2445097fe8f5a5 /src/live_effects/effect.cpp | |
| parent | oops. sys/wait.h not on win32 (diff) | |
| download | inkscape-8a38c52bce619b07117cdd87a183eb05fb51e28e.tar.gz inkscape-8a38c52bce619b07117cdd87a183eb05fb51e28e.zip | |
merge gsoc2008_johan_path2geom into trunk
(bzr r5823)
Diffstat (limited to 'src/live_effects/effect.cpp')
| -rw-r--r-- | src/live_effects/effect.cpp | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 765d0a59b..0749e4e93 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -221,40 +221,22 @@ Effect::doBeforeEffect (SPLPEItem */*lpeitem*/) void Effect::doEffect (SPCurve * curve) { - NArtBpath *new_bpath = doEffect_nartbpath(curve->get_bpath()); + NArtBpath const *bpath_in = curve->get_bpath(); - curve->set_bpath(new_bpath); -} + std::vector<Geom::Path> result_pathv; -NArtBpath * -Effect::doEffect_nartbpath (NArtBpath const * path_in) -{ try { - std::vector<Geom::Path> orig_pathv = BPath_to_2GeomPath(path_in); - - std::vector<Geom::Path> result_pathv = doEffect_path(orig_pathv); + std::vector<Geom::Path> orig_pathv = BPath_to_2GeomPath(bpath_in); - NArtBpath *new_bpath = BPath_from_2GeomPath(result_pathv); - - return new_bpath; + result_pathv = doEffect_path(orig_pathv); } catch (std::exception & e) { g_warning("Exception during LPE %s execution. \n %s", getName().c_str(), e.what()); SP_ACTIVE_DESKTOP->messageStack()->flash( Inkscape::WARNING_MESSAGE, _("An exception occurred during execution of the Path Effect.") ); - - NArtBpath *path_out; - - unsigned ret = 0; - while ( path_in[ret].code != NR_END ) { - ++ret; - } - unsigned len = ++ret; - - path_out = g_new(NArtBpath, len); - memcpy(path_out, path_in, len * sizeof(NArtBpath)); - return path_out; } + + curve->set_pathv(result_pathv); } std::vector<Geom::Path> |
