summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2007-11-12 18:59:48 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2007-11-12 18:59:48 +0000
commit4c281d3f704bfc4939603a53fd97015107d79fcb (patch)
treea13316a7090ec7f73f0dbf9c2171bc0235c23c64 /src
parentFix bad markups in it.po (Translators: Please check your markups with check-m... (diff)
downloadinkscape-4c281d3f704bfc4939603a53fd97015107d79fcb.tar.gz
inkscape-4c281d3f704bfc4939603a53fd97015107d79fcb.zip
LPE: no longer overload doEffect methods, but name them according to accepted arguments. This saves developer brain time because of 'hiding' issues.
(bzr r4067)
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/effect.cpp12
-rw-r--r--src/live_effects/effect.h6
-rw-r--r--src/live_effects/lpe-curvestitch.cpp2
-rw-r--r--src/live_effects/lpe-curvestitch.h2
-rw-r--r--src/live_effects/lpe-gears.cpp2
-rw-r--r--src/live_effects/lpe-gears.h4
-rw-r--r--src/live_effects/lpe-pathalongpath.cpp2
-rw-r--r--src/live_effects/lpe-pathalongpath.h4
-rw-r--r--src/live_effects/lpe-skeletalstrokes.cpp2
-rw-r--r--src/live_effects/lpe-skeletalstrokes.h2
-rw-r--r--src/live_effects/lpe-skeleton.cpp6
-rw-r--r--src/live_effects/lpe-skeleton.h6
-rw-r--r--src/live_effects/lpe-slant.h1
-rw-r--r--src/live_effects/lpe-test-doEffect-stack.cpp10
-rw-r--r--src/live_effects/lpe-test-doEffect-stack.h6
15 files changed, 33 insertions, 34 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp
index 77e89ddf4..f87e365bc 100644
--- a/src/live_effects/effect.cpp
+++ b/src/live_effects/effect.cpp
@@ -122,7 +122,7 @@ Effect::getName()
void
Effect::doEffect (SPCurve * curve)
{
- NArtBpath *new_bpath = doEffect(SP_CURVE_BPATH(curve));
+ NArtBpath *new_bpath = doEffect_nartbpath(SP_CURVE_BPATH(curve));
if (new_bpath && new_bpath != SP_CURVE_BPATH(curve)) { // FIXME, add function to SPCurve to change bpath? or a copy function?
if (curve->_bpath) {
@@ -133,12 +133,12 @@ Effect::doEffect (SPCurve * curve)
}
NArtBpath *
-Effect::doEffect (NArtBpath * path_in)
+Effect::doEffect_nartbpath (NArtBpath * path_in)
{
try {
std::vector<Geom::Path> orig_pathv = BPath_to_2GeomPath(path_in);
- std::vector<Geom::Path> result_pathv = doEffect(orig_pathv);
+ std::vector<Geom::Path> result_pathv = doEffect_path(orig_pathv);
NArtBpath *new_bpath = BPath_from_2GeomPath(result_pathv);
@@ -164,7 +164,7 @@ Effect::doEffect (NArtBpath * path_in)
}
std::vector<Geom::Path>
-Effect::doEffect (std::vector<Geom::Path> & path_in)
+Effect::doEffect_path (std::vector<Geom::Path> & path_in)
{
Geom::Piecewise<Geom::D2<Geom::SBasis> > pwd2_in;
@@ -172,7 +172,7 @@ Effect::doEffect (std::vector<Geom::Path> & path_in)
pwd2_in.concat( path_in[i].toPwSb() );
}
- Geom::Piecewise<Geom::D2<Geom::SBasis> > pwd2_out = doEffect(pwd2_in);
+ Geom::Piecewise<Geom::D2<Geom::SBasis> > pwd2_out = doEffect_pwd2(pwd2_in);
std::vector<Geom::Path> path_out = Geom::path_from_piecewise( pwd2_out, LPE_CONVERSION_TOLERANCE);
@@ -180,7 +180,7 @@ Effect::doEffect (std::vector<Geom::Path> & path_in)
}
Geom::Piecewise<Geom::D2<Geom::SBasis> >
-Effect::doEffect (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in)
+Effect::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in)
{
g_warning("Effect has no doEffect implementation");
return pwd2_in;
diff --git a/src/live_effects/effect.h b/src/live_effects/effect.h
index 221f94b40..f6732f9b2 100644
--- a/src/live_effects/effect.h
+++ b/src/live_effects/effect.h
@@ -96,11 +96,11 @@ protected:
// called by this base class. (i.e. doEffect(SPCurve * curve) defaults to calling
// doEffect(std::vector<Geom::Path> )
virtual NArtBpath *
- doEffect (NArtBpath * path_in);
+ doEffect_nartbpath (NArtBpath * path_in);
virtual std::vector<Geom::Path>
- doEffect (std::vector<Geom::Path> & path_in);
+ doEffect_path (std::vector<Geom::Path> & path_in);
virtual Geom::Piecewise<Geom::D2<Geom::SBasis> >
- doEffect (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in);
+ doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in);
void registerParameter(Parameter * param);
Parameter * getNextOncanvasEditableParam();
diff --git a/src/live_effects/lpe-curvestitch.cpp b/src/live_effects/lpe-curvestitch.cpp
index 0268cec33..f0573beb8 100644
--- a/src/live_effects/lpe-curvestitch.cpp
+++ b/src/live_effects/lpe-curvestitch.cpp
@@ -67,7 +67,7 @@ LPECurveStitch::~LPECurveStitch()
}
std::vector<Geom::Path>
-LPECurveStitch::doEffect (std::vector<Geom::Path> & path_in)
+LPECurveStitch::doEffect_path (std::vector<Geom::Path> & path_in)
{
if (path_in.size() >= 2) {
startpoint_variation.resetRandomizer();
diff --git a/src/live_effects/lpe-curvestitch.h b/src/live_effects/lpe-curvestitch.h
index db09a34ee..803625c93 100644
--- a/src/live_effects/lpe-curvestitch.h
+++ b/src/live_effects/lpe-curvestitch.h
@@ -28,7 +28,7 @@ public:
LPECurveStitch(LivePathEffectObject *lpeobject);
virtual ~LPECurveStitch();
- virtual std::vector<Geom::Path> doEffect (std::vector<Geom::Path> & path_in);
+ virtual std::vector<Geom::Path> doEffect_path (std::vector<Geom::Path> & path_in);
virtual void resetDefaults(SPItem * item);
diff --git a/src/live_effects/lpe-gears.cpp b/src/live_effects/lpe-gears.cpp
index d5bb8e5ef..2fdc0116e 100644
--- a/src/live_effects/lpe-gears.cpp
+++ b/src/live_effects/lpe-gears.cpp
@@ -222,7 +222,7 @@ LPEGears::~LPEGears()
}
std::vector<Geom::Path>
-LPEGears::doEffect (std::vector<Geom::Path> & path_in)
+LPEGears::doEffect_path (std::vector<Geom::Path> & path_in)
{
std::vector<Geom::Path> path_out;
Geom::Path gearpath = path_in[0];
diff --git a/src/live_effects/lpe-gears.h b/src/live_effects/lpe-gears.h
index 01d74943a..fe210adda 100644
--- a/src/live_effects/lpe-gears.h
+++ b/src/live_effects/lpe-gears.h
@@ -22,9 +22,9 @@ public:
LPEGears(LivePathEffectObject *lpeobject);
virtual ~LPEGears();
- std::vector<Geom::Path> doEffect (std::vector<Geom::Path> & path_in);
+ virtual std::vector<Geom::Path> doEffect_path (std::vector<Geom::Path> & path_in);
- void setup_notepath(Inkscape::NodePath::Path *np);
+ virtual void setup_notepath(Inkscape::NodePath::Path *np);
private:
ScalarParam teeth;
diff --git a/src/live_effects/lpe-pathalongpath.cpp b/src/live_effects/lpe-pathalongpath.cpp
index cd9c433f7..499b77f8c 100644
--- a/src/live_effects/lpe-pathalongpath.cpp
+++ b/src/live_effects/lpe-pathalongpath.cpp
@@ -92,7 +92,7 @@ LPEPathAlongPath::~LPEPathAlongPath()
Geom::Piecewise<Geom::D2<Geom::SBasis> >
-LPEPathAlongPath::doEffect (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in)
+LPEPathAlongPath::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in)
{
using namespace Geom;
diff --git a/src/live_effects/lpe-pathalongpath.h b/src/live_effects/lpe-pathalongpath.h
index 59ae8b4d2..d404e0f67 100644
--- a/src/live_effects/lpe-pathalongpath.h
+++ b/src/live_effects/lpe-pathalongpath.h
@@ -30,9 +30,9 @@ public:
LPEPathAlongPath(LivePathEffectObject *lpeobject);
virtual ~LPEPathAlongPath();
- Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in);
+ virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in);
- void resetDefaults(SPItem * item);
+ virtual void resetDefaults(SPItem * item);
private:
PathParam bend_path;
diff --git a/src/live_effects/lpe-skeletalstrokes.cpp b/src/live_effects/lpe-skeletalstrokes.cpp
index d351c3553..8e70f8a87 100644
--- a/src/live_effects/lpe-skeletalstrokes.cpp
+++ b/src/live_effects/lpe-skeletalstrokes.cpp
@@ -88,7 +88,7 @@ LPESkeletalStrokes::~LPESkeletalStrokes()
Geom::Piecewise<Geom::D2<Geom::SBasis> >
-LPESkeletalStrokes::doEffect (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in)
+LPESkeletalStrokes::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in)
{
using namespace Geom;
diff --git a/src/live_effects/lpe-skeletalstrokes.h b/src/live_effects/lpe-skeletalstrokes.h
index d18bb7cb5..b7739471c 100644
--- a/src/live_effects/lpe-skeletalstrokes.h
+++ b/src/live_effects/lpe-skeletalstrokes.h
@@ -30,7 +30,7 @@ public:
LPESkeletalStrokes(LivePathEffectObject *lpeobject);
virtual ~LPESkeletalStrokes();
- Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in);
+ virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in);
private:
PathParam pattern;
diff --git a/src/live_effects/lpe-skeleton.cpp b/src/live_effects/lpe-skeleton.cpp
index 13356972e..c0fe0adc0 100644
--- a/src/live_effects/lpe-skeleton.cpp
+++ b/src/live_effects/lpe-skeleton.cpp
@@ -56,7 +56,7 @@ LPESkeleton::doEffect (SPCurve * curve)
}
NArtBpath *
-LPESkeleton::doEffect (NArtBpath * path_in)
+LPESkeleton::doEffect_nartbpath (NArtBpath * path_in)
{
NArtBpath *path_out;
unsigned ret = 0;
@@ -72,7 +72,7 @@ LPESkeleton::doEffect (NArtBpath * path_in)
}
std::vector<Geom::Path>
-LPESkeleton::doEffect (std::vector<Geom::Path> & path_in)
+LPESkeleton::doEffect_path (std::vector<Geom::Path> & path_in)
{
std::vector<Geom::Path> path_out;
@@ -83,7 +83,7 @@ LPESkeleton::doEffect (std::vector<Geom::Path> & path_in)
*/
Geom::Piecewise<Geom::D2<Geom::SBasis> >
-LPESkeleton::doEffect (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in)
+LPESkeleton::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in)
{
Geom::Piecewise<Geom::D2<Geom::SBasis> > output;
diff --git a/src/live_effects/lpe-skeleton.h b/src/live_effects/lpe-skeleton.h
index ed63d6388..6999cfac0 100644
--- a/src/live_effects/lpe-skeleton.h
+++ b/src/live_effects/lpe-skeleton.h
@@ -28,9 +28,9 @@ public:
// Choose to implement one of the doEffect functions. You can delete or comment out the others.
// virtual void doEffect (SPCurve * curve);
-// virtual NArtBpath * doEffect (NArtBpath * path_in);
-// virtual std::vector<Geom::Path> doEffect (std::vector<Geom::Path> & path_in);
- virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in);
+// virtual NArtBpath * doEffect_nartbpath (NArtBpath * path_in);
+// virtual std::vector<Geom::Path> doEffect_path (std::vector<Geom::Path> & path_in);
+ virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in);
private:
// add the parameters for your effect here:
diff --git a/src/live_effects/lpe-slant.h b/src/live_effects/lpe-slant.h
index bdfe55383..43c736945 100644
--- a/src/live_effects/lpe-slant.h
+++ b/src/live_effects/lpe-slant.h
@@ -24,7 +24,6 @@ public:
LPESlant(LivePathEffectObject *lpeobject);
virtual ~LPESlant();
- using Effect::doEffect;
virtual void doEffect(SPCurve * curve);
private:
diff --git a/src/live_effects/lpe-test-doEffect-stack.cpp b/src/live_effects/lpe-test-doEffect-stack.cpp
index d071050e9..f6ecad562 100644
--- a/src/live_effects/lpe-test-doEffect-stack.cpp
+++ b/src/live_effects/lpe-test-doEffect-stack.cpp
@@ -40,10 +40,10 @@ LPEdoEffectStackTest::doEffect (SPCurve * curve)
}
NArtBpath *
-LPEdoEffectStackTest::doEffect (NArtBpath * path_in)
+LPEdoEffectStackTest::doEffect_nartbpath (NArtBpath * path_in)
{
if (step >= 2) {
- return Effect::doEffect(path_in);
+ return Effect::doEffect_nartbpath(path_in);
} else {
// return here
NArtBpath *path_out;
@@ -61,10 +61,10 @@ LPEdoEffectStackTest::doEffect (NArtBpath * path_in)
}
std::vector<Geom::Path>
-LPEdoEffectStackTest::doEffect (std::vector<Geom::Path> & path_in)
+LPEdoEffectStackTest::doEffect_path (std::vector<Geom::Path> & path_in)
{
if (step >= 3) {
- return Effect::doEffect(path_in);
+ return Effect::doEffect_path(path_in);
} else {
// return here
std::vector<Geom::Path> path_out = path_in;
@@ -73,7 +73,7 @@ LPEdoEffectStackTest::doEffect (std::vector<Geom::Path> & path_in)
}
Geom::Piecewise<Geom::D2<Geom::SBasis> >
-LPEdoEffectStackTest::doEffect (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in)
+LPEdoEffectStackTest::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in)
{
Geom::Piecewise<Geom::D2<Geom::SBasis> > output = pwd2_in;
diff --git a/src/live_effects/lpe-test-doEffect-stack.h b/src/live_effects/lpe-test-doEffect-stack.h
index dd0cf76cc..3d853aa8c 100644
--- a/src/live_effects/lpe-test-doEffect-stack.h
+++ b/src/live_effects/lpe-test-doEffect-stack.h
@@ -25,9 +25,9 @@ public:
virtual ~LPEdoEffectStackTest();
virtual void doEffect (SPCurve * curve);
- virtual NArtBpath * doEffect (NArtBpath * path_in);
- virtual std::vector<Geom::Path> doEffect (std::vector<Geom::Path> & path_in);
- virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in);
+ virtual NArtBpath * doEffect_nartbpath (NArtBpath * path_in);
+ virtual std::vector<Geom::Path> doEffect_path (std::vector<Geom::Path> & path_in);
+ virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in);
private:
ScalarParam step;