summaryrefslogtreecommitdiffstats
path: root/src/live_effects
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2019-07-16 14:37:19 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2019-07-19 21:33:23 +0000
commite2f4af7eb9d6a497308925930e89d2a403c3a5c9 (patch)
treef1abd09c7996dc93dbb09d79b91e70e3a5f0847d /src/live_effects
parentFix maren pointed bugs (diff)
downloadinkscape-e2f4af7eb9d6a497308925930e89d2a403c3a5c9.tar.gz
inkscape-e2f4af7eb9d6a497308925930e89d2a403c3a5c9.zip
Improvemets to power pencil
Diffstat (limited to 'src/live_effects')
-rw-r--r--src/live_effects/effect.cpp3
-rw-r--r--src/live_effects/effect.h1
-rw-r--r--src/live_effects/lpe-powerstroke.cpp16
-rw-r--r--src/live_effects/lpe-powerstroke.h17
4 files changed, 20 insertions, 17 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp
index 03f482190..b4aa42e0e 100644
--- a/src/live_effects/effect.cpp
+++ b/src/live_effects/effect.cpp
@@ -1067,7 +1067,7 @@ Effect::New(EffectType lpenr, LivePathEffectObject *lpeobj)
neweffect = nullptr;
break;
}
-
+
if (neweffect) {
neweffect->readallParameters(lpeobj->getRepr());
}
@@ -1262,6 +1262,7 @@ void Effect::doOnApply_impl(SPLPEItem const* lpeitem)
sp_lpe_item = const_cast<SPLPEItem *>(lpeitem);
doOnApply(lpeitem);
setReady();
+ has_exception = false;
}
void Effect::doBeforeEffect_impl(SPLPEItem const* lpeitem)
diff --git a/src/live_effects/effect.h b/src/live_effects/effect.h
index 9cdb17c02..725aae6c4 100644
--- a/src/live_effects/effect.h
+++ b/src/live_effects/effect.h
@@ -113,6 +113,7 @@ public:
void addHandles(KnotHolder *knotholder, SPItem *item);
std::vector<Geom::PathVector> getCanvasIndicators(SPLPEItem const* lpeitem);
void update_helperpath();
+ bool has_exception;
inline bool providesOwnFlashPaths() const {
return provides_own_flash_paths || show_orig_path;
diff --git a/src/live_effects/lpe-powerstroke.cpp b/src/live_effects/lpe-powerstroke.cpp
index e7700ba78..0a13e4661 100644
--- a/src/live_effects/lpe-powerstroke.cpp
+++ b/src/live_effects/lpe-powerstroke.cpp
@@ -133,22 +133,6 @@ static const Util::EnumData<unsigned> InterpolatorTypeData[] = {
};
static const Util::EnumDataConverter<unsigned> InterpolatorTypeConverter(InterpolatorTypeData, sizeof(InterpolatorTypeData)/sizeof(*InterpolatorTypeData));
-enum LineCapType {
- LINECAP_BUTT,
- LINECAP_SQUARE,
- LINECAP_ROUND,
- LINECAP_PEAK,
- LINECAP_ZERO_WIDTH
-};
-static const Util::EnumData<unsigned> LineCapTypeData[] = {
- {LINECAP_BUTT, N_("Butt"), "butt"},
- {LINECAP_SQUARE, N_("Square"), "square"},
- {LINECAP_ROUND, N_("Round"), "round"},
- {LINECAP_PEAK, N_("Peak"), "peak"},
- {LINECAP_ZERO_WIDTH, N_("Zero width"), "zerowidth"}
-};
-static const Util::EnumDataConverter<unsigned> LineCapTypeConverter(LineCapTypeData, sizeof(LineCapTypeData)/sizeof(*LineCapTypeData));
-
enum LineJoinType {
LINEJOIN_BEVEL,
LINEJOIN_ROUND,
diff --git a/src/live_effects/lpe-powerstroke.h b/src/live_effects/lpe-powerstroke.h
index 9ac4a65a5..bbb5a88a9 100644
--- a/src/live_effects/lpe-powerstroke.h
+++ b/src/live_effects/lpe-powerstroke.h
@@ -21,6 +21,23 @@
namespace Inkscape {
namespace LivePathEffect {
+enum LineCapType {
+ LINECAP_BUTT,
+ LINECAP_SQUARE,
+ LINECAP_ROUND,
+ LINECAP_PEAK,
+ LINECAP_ZERO_WIDTH
+};
+
+static const Util::EnumData<unsigned> LineCapTypeData[] = {
+ {LINECAP_BUTT, N_("Butt"), "butt"},
+ {LINECAP_SQUARE, N_("Square"), "square"},
+ {LINECAP_ROUND, N_("Round"), "round"},
+ {LINECAP_PEAK, N_("Peak"), "peak"},
+ {LINECAP_ZERO_WIDTH, N_("Zero width"), "zerowidth"}
+};
+static const Util::EnumDataConverter<unsigned> LineCapTypeConverter(LineCapTypeData, sizeof(LineCapTypeData)/sizeof(*LineCapTypeData));
+
class LPEPowerStroke : public Effect {
public:
LPEPowerStroke(LivePathEffectObject *lpeobject);