diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-05-09 14:07:12 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-05-09 14:07:12 +0000 |
| commit | 8b4ad809b306a360d39470ea2a487ebc0326b92d (patch) | |
| tree | c67237c1a4cb8f0caf0b1cd5e66f6385c9a920c3 /src | |
| parent | utf8-to-roff: work around what's arguably a bug in perl 5.10 (diff) | |
| download | inkscape-8b4ad809b306a360d39470ea2a487ebc0326b92d.tar.gz inkscape-8b4ad809b306a360d39470ea2a487ebc0326b92d.zip | |
Remove LPESlant.
- it causes data hiding problems (appears to be the *only* place outside SPCurve that directly writes to SPCurve's bpath !)
- *when someone really wants this effect, let me know and I'll recode it*
(bzr r5638)
Diffstat (limited to 'src')
| -rw-r--r-- | src/live_effects/Makefile_insert | 2 | ||||
| -rw-r--r-- | src/live_effects/effect.cpp | 5 | ||||
| -rw-r--r-- | src/live_effects/effect.h | 1 | ||||
| -rw-r--r-- | src/live_effects/lpe-slant.cpp | 55 | ||||
| -rw-r--r-- | src/live_effects/lpe-slant.h | 40 |
5 files changed, 0 insertions, 103 deletions
diff --git a/src/live_effects/Makefile_insert b/src/live_effects/Makefile_insert index 60c2ece42..7f0adf3a6 100644 --- a/src/live_effects/Makefile_insert +++ b/src/live_effects/Makefile_insert @@ -32,8 +32,6 @@ live_effects_liblive_effects_a_SOURCES = \ live_effects/lpe-gears.h \ live_effects/lpe-test-doEffect-stack.cpp \ live_effects/lpe-test-doEffect-stack.h \ - live_effects/lpe-slant.cpp \ - live_effects/lpe-slant.h \ live_effects/lpe-spiro.cpp \ live_effects/lpe-spiro.h \ live_effects/spiro.h \ diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index f699248e4..2d2a8cb22 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -37,7 +37,6 @@ #include "live_effects/lpe-sketch.h" #include "live_effects/lpe-vonkoch.h" #include "live_effects/lpe-knot.h" -#include "live_effects/lpe-slant.h" #include "live_effects/lpe-test-doEffect-stack.h" #include "live_effects/lpe-gears.h" #include "live_effects/lpe-curvestitch.h" @@ -60,7 +59,6 @@ const Util::EnumData<EffectType> LPETypeData[INVALID_LPE] = { {VONKOCH, N_("VonKoch"), "vonkoch"}, {KNOT, N_("Knot"), "knot"}, #ifdef LPE_ENABLE_TEST_EFFECTS - {SLANT, N_("Slant"), "slant"}, {DOEFFECTSTACK_TEST, N_("doEffect stack test"), "doeffectstacktest"}, #endif {GEARS, N_("Gears"), "gears"}, @@ -93,9 +91,6 @@ Effect::New(EffectType lpenr, LivePathEffectObject *lpeobj) neweffect = static_cast<Effect*> ( new LPEKnot(lpeobj) ); break; #ifdef LPE_ENABLE_TEST_EFFECTS - case SLANT: - neweffect = static_cast<Effect*> ( new LPESlant(lpeobj) ); - break; case DOEFFECTSTACK_TEST: neweffect = static_cast<Effect*> ( new LPEdoEffectStackTest(lpeobj) ); break; diff --git a/src/live_effects/effect.h b/src/live_effects/effect.h index 7ab4537f9..f4287bb52 100644 --- a/src/live_effects/effect.h +++ b/src/live_effects/effect.h @@ -57,7 +57,6 @@ enum EffectType { VONKOCH, KNOT, #ifdef LPE_ENABLE_TEST_EFFECTS - SLANT, DOEFFECTSTACK_TEST, #endif GEARS, diff --git a/src/live_effects/lpe-slant.cpp b/src/live_effects/lpe-slant.cpp deleted file mode 100644 index 7382d15e2..000000000 --- a/src/live_effects/lpe-slant.cpp +++ /dev/null @@ -1,55 +0,0 @@ -#define INKSCAPE_LPE_SLANT_CPP - -/* - * Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl> - * - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -#include "live_effects/lpe-slant.h" -#include "display/curve.h" -#include <libnr/n-art-bpath.h> - -namespace Inkscape { -namespace LivePathEffect { - -LPESlant::LPESlant(LivePathEffectObject *lpeobject) : - Effect(lpeobject), - factor(_("Slant factor"), _("y = y + x*(slant factor)"), "factor", &wr, this), - center(_("Center"), _("The x-coord of this point is around which the slant will happen"), "center", &wr, this) -{ - registerParameter( dynamic_cast<Parameter *>(&factor) ); - registerParameter( dynamic_cast<Parameter *>(¢er) ); -} - -LPESlant::~LPESlant() -{ -} - -void -LPESlant::doEffect(SPCurve * curve) -{ - NArtBpath *bpath = curve->get_bpath(); - int i = 0; - while(bpath[i].code != NR_END) { - bpath[i].y1 += (bpath[i].x1-center[Geom::X]) * factor; - bpath[i].y2 += (bpath[i].x2-center[Geom::X]) * factor; - bpath[i].y3 += (bpath[i].x3-center[Geom::X]) * factor; - i++; - } - -} - -}; //namespace LivePathEffect -}; /* namespace Inkscape */ - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : diff --git a/src/live_effects/lpe-slant.h b/src/live_effects/lpe-slant.h deleted file mode 100644 index 43c736945..000000000 --- a/src/live_effects/lpe-slant.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef INKSCAPE_LPE_SLANT_H -#define INKSCAPE_LPE_SLANT_H - -/* - * Inkscape::LPESlant - * -* Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl> - * - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -#include "live_effects/effect.h" -#include "live_effects/parameter/parameter.h" -#include "live_effects/parameter/point.h" -#include "ui/widget/registered-widget.h" - - - -namespace Inkscape { -namespace LivePathEffect { - -class LPESlant : public Effect { -public: - LPESlant(LivePathEffectObject *lpeobject); - virtual ~LPESlant(); - - virtual void doEffect(SPCurve * curve); - -private: - ScalarParam factor; - PointParam center; - - LPESlant(const LPESlant&); - LPESlant& operator=(const LPESlant&); -}; - -}; //namespace LivePathEffect -}; //namespace Inkscape - -#endif |
