summaryrefslogtreecommitdiffstats
path: root/src/live_effects/effect.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-08-18 00:32:47 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-08-18 00:32:47 +0000
commit5a55928bc403b41e1a724d9e52c0911603b0966b (patch)
tree4d1c84eb25d436af2becaacde97437b8dc2bfcba /src/live_effects/effect.cpp
parentNew LPE to draw infinite lines (cut by a limiting bounding box), rays and seg... (diff)
downloadinkscape-5a55928bc403b41e1a724d9e52c0911603b0966b.tar.gz
inkscape-5a55928bc403b41e1a724d9e52c0911603b0966b.zip
reimplement acceptsNumParams(); instead of making it a virtual function we just make case distinctions
(bzr r6642)
Diffstat (limited to 'src/live_effects/effect.cpp')
-rw-r--r--src/live_effects/effect.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp
index 3f12345ae..1308a1860 100644
--- a/src/live_effects/effect.cpp
+++ b/src/live_effects/effect.cpp
@@ -107,6 +107,17 @@ const Util::EnumData<EffectType> LPETypeData[] = {
};
const Util::EnumDataConverter<EffectType> LPETypeConverter(LPETypeData, sizeof(LPETypeData)/sizeof(*LPETypeData));
+int
+Effect::acceptsNumParams(EffectType type) {
+ switch (type) {
+ case ANGLE_BISECTOR: return 3;
+ case PERP_BISECTOR: return 2;
+ case CIRCLE_3PTS: return 3;
+ case CIRCLE_WITH_RADIUS: return 2;
+ default: return 0;
+ }
+}
+
Effect*
Effect::New(EffectType lpenr, LivePathEffectObject *lpeobj)
{