From: johanengelen Date: Fri, 9 May 2008 14:07:12 +0000 (+0000) Subject: Remove LPESlant. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0e3f494349e05df13686bbba4f727d41e39ac533;p=inkscape.git 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* --- 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 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 ( new LPEKnot(lpeobj) ); break; #ifdef LPE_ENABLE_TEST_EFFECTS - case SLANT: - neweffect = static_cast ( new LPESlant(lpeobj) ); - break; case DOEFFECTSTACK_TEST: neweffect = static_cast ( 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 - * - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -#include "live_effects/lpe-slant.h" -#include "display/curve.h" -#include - -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(&factor) ); - registerParameter( dynamic_cast(¢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 - * - * 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