summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 10cc54e)
raw | patch | inline | side by side (parent: 10cc54e)
author | cilix42 <cilix42@users.sourceforge.net> | |
Sat, 13 Sep 2008 16:51:16 +0000 (16:51 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Sat, 13 Sep 2008 16:51:16 +0000 (16:51 +0000) |
src/live_effects/lpe-path_length.cpp | patch | blob | history | |
src/live_effects/lpe-path_length.h | patch | blob | history | |
src/sp-lpe-item.cpp | patch | blob | history |
index 3b9b07c82a1ab81d820a042766917b16530c6db7..5ecf2ffa29f74a74a276fe2b96cfd70b43092367 100644 (file)
}
+bool
+LPEPathLength::hideCanvasText() {
+ // this is only used in sp-lpe-item.cpp to hide the canvas text when the effect is invisible
+ info_text.param_setValue("");
+}
+
Geom::Piecewise<Geom::D2<Geom::SBasis> >
LPEPathLength::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in)
{
index 1ec5165e95c40c1cd1a4445d4de8012c661544d5..5a4638d904b66a6f901de9a725168be91032029c 100644 (file)
virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
+ bool hideCanvasText();
+
private:
LPEPathLength(const LPEPathLength&);
LPEPathLength& operator=(const LPEPathLength&);
diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp
index 6e2e65d7d35aee8868d60c627a6ffa383ae088af..56ffd190c00c1a7f8a100b4cd507e70165a5c5d1 100644 (file)
--- a/src/sp-lpe-item.cpp
+++ b/src/sp-lpe-item.cpp
#endif
#include "live_effects/effect.h"
+#include "live_effects/lpe-path_length.h"
#include "live_effects/lpeobject.h"
#include "live_effects/lpeobject-reference.h"
if (!sp_lpe_item_path_effects_enabled(lpeitem))
return;
+ // TODO: hack! this will be removed when path length measuring is reimplemented in a better way
+ PathEffectList lpelist = sp_lpe_item_get_effect_list(lpeitem);
+ std::list<Inkscape::LivePathEffect::LPEObjectReference *>::iterator i;
+ for (i = lpelist.begin(); i != lpelist.end(); ++i) {
+ Inkscape::LivePathEffect::Effect *lpe = (*i)->lpeobject->lpe;
+ if (dynamic_cast<Inkscape::LivePathEffect::LPEPathLength *>(lpe)) {
+ if (!lpe->isVisible()) {
+ // we manually disable text for LPEPathLength
+ dynamic_cast<Inkscape::LivePathEffect::LPEPathLength *>(lpe)->hideCanvasText();
+ }
+ }
+ }
+
SPLPEItem *top;
if (wholetree) {