summaryrefslogtreecommitdiffstats
path: root/src/live_effects/effect.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-05-09 09:37:08 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-05-09 09:37:08 +0000
commite1db2612978dc4bca7d83ab3a4208c7523c67365 (patch)
treec24054baf0b7d2cb0cfe862c9bf633a04c500809 /src/live_effects/effect.cpp
parentA little bit of refactoring of constrained object snapping (diff)
downloadinkscape-e1db2612978dc4bca7d83ab3a4208c7523c67365.tar.gz
inkscape-e1db2612978dc4bca7d83ab3a4208c7523c67365.zip
- try to use more forward declarations for less dependencies on display/curve.h
- change _bpath to private member of SPCurve, obtain and set with get_bpath and set_bpath. - added const methods, so protect changes to _bpath in SPCurve (bzr r5636)
Diffstat (limited to 'src/live_effects/effect.cpp')
-rw-r--r--src/live_effects/effect.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp
index 2cd88fd8b..f699248e4 100644
--- a/src/live_effects/effect.cpp
+++ b/src/live_effects/effect.cpp
@@ -164,18 +164,13 @@ Effect::doBeforeEffect (SPLPEItem */*lpeitem*/)
void
Effect::doEffect (SPCurve * curve)
{
- NArtBpath *new_bpath = doEffect_nartbpath(SP_CURVE_BPATH(curve));
+ NArtBpath *new_bpath = doEffect_nartbpath(curve->get_bpath());
- if (new_bpath && new_bpath != SP_CURVE_BPATH(curve)) { // FIXME, add function to SPCurve to change bpath? or a copy function?
- if (curve->_bpath) {
- g_free(curve->_bpath); //delete old bpath
- }
- curve->_bpath = new_bpath;
- }
+ curve->set_bpath(new_bpath);
}
NArtBpath *
-Effect::doEffect_nartbpath (NArtBpath * path_in)
+Effect::doEffect_nartbpath (NArtBpath const * path_in)
{
try {
std::vector<Geom::Path> orig_pathv = BPath_to_2GeomPath(path_in);