summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3515994)
raw | patch | inline | side by side (parent: 3515994)
author | cilix42 <cilix42@users.sourceforge.net> | |
Mon, 18 Aug 2008 00:32:47 +0000 (00:32 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Mon, 18 Aug 2008 00:32:47 +0000 (00:32 +0000) |
src/live_effects/effect.cpp | patch | blob | history | |
src/live_effects/effect.h | patch | blob | history |
index 3f12345ae2af7e736e8c57651302fb675574849b..1308a1860092d838346f1067ffadb5b41f808910 100644 (file)
};
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)
{
index c01cab5c384a45714154b553d8f2c9d1e1a28193..1bc3988ab49e3b4bf94d20a86e23684275467e92 100644 (file)
void writeParamsToSVG();
virtual void acceptParamPath (SPPath *param_path);
- virtual int acceptsNumParams() { return 0; }
+ static int acceptsNumParams(EffectType type);
+ int acceptsNumParams() { return acceptsNumParams(effectType()); }
void doAcceptPathPreparations(SPLPEItem *lpeitem);
inline bool pathParamAccepted() { return done_pathparam_set; }