summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c270061)
raw | patch | inline | side by side (parent: c270061)
author | cilix42 <cilix42@users.sourceforge.net> | |
Mon, 18 Aug 2008 00:33:33 +0000 (00:33 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Mon, 18 Aug 2008 00:33:33 +0000 (00:33 +0000) |
src/live_effects/effect.cpp | patch | blob | history | |
src/live_effects/effect.h | patch | blob | history | |
src/sp-lpe-item.cpp | patch | blob | history |
index 7d01f63dd54308e02cf8abcd830ef3badb660469..472fe5d9dd51713e961624a276b7abadb497d4d0 100644 (file)
const Util::EnumDataConverter<EffectType> LPETypeConverter(LPETypeData, sizeof(LPETypeData)/sizeof(*LPETypeData));
int
-Effect::acceptsNumParams(EffectType type) {
+Effect::acceptsNumClicks(EffectType type) {
switch (type) {
case ANGLE_BISECTOR: return 3;
case PERP_BISECTOR: return 2;
/**
* Effects can have a parameter path set before they are applied by accepting a nonzero number of
* mouse clicks. This method activates the pen context, which waits for the specified number of
- * clicks. Override Effect::acceptsNumParams() to return the number of expected mouse clicks.
+ * clicks. Override Effect::acceptsNumClicks() to return the number of expected mouse clicks.
*/
void
Effect::doAcceptPathPreparations(SPLPEItem *lpeitem)
SPEventContext *ec = desktop->event_context;
SPPenContext *pc = SP_PEN_CONTEXT(ec);
- pc->expecting_clicks_for_LPE = this->acceptsNumParams();
+ pc->expecting_clicks_for_LPE = this->acceptsNumClicks();
pc->waiting_LPE = this;
pc->waiting_item = lpeitem;
pc->polylines_only = true;
ec->desktop->messageStack()->flash(Inkscape::INFORMATION_MESSAGE,
g_strdup_printf(_("Please specify a parameter path for the LPE '%s' with %d mouse clicks"),
- getName().c_str(), acceptsNumParams()));
+ getName().c_str(), acceptsNumClicks()));
}
void
index e703c888b11faf0ef673c80fab8ec68d716e079b..a660738812a29eacad537f0dd9b2717306132c4a 100644 (file)
void writeParamsToSVG();
virtual void acceptParamPath (SPPath *param_path);
- static int acceptsNumParams(EffectType type);
- int acceptsNumParams() { return acceptsNumParams(effectType()); }
+ static int acceptsNumClicks(EffectType type);
+ int acceptsNumClicks() { return acceptsNumClicks(effectType()); }
void doAcceptPathPreparations(SPLPEItem *lpeitem);
/*
diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp
index 7ff5a7f4be23a809558999c57ba1dda6fe192cb0..6e2e65d7d35aee8868d60c627a6ffa383ae088af 100644 (file)
--- a/src/sp-lpe-item.cpp
+++ b/src/sp-lpe-item.cpp
Inkscape::LivePathEffect::Effect *lpe = lpeobj->lpe;
if (lpe->isVisible()) {
- if (lpe->acceptsNumParams() > 0 && !lpe->isReady()) {
+ if (lpe->acceptsNumClicks() > 0 && !lpe->isReady()) {
// if the effect expects mouse input before being applied and the input is not finished
// yet, we don't alter the path
return;