summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e543680)
raw | patch | inline | side by side (parent: e543680)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Fri, 9 May 2008 14:07:12 +0000 (14:07 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Fri, 9 May 2008 14:07:12 +0000 (14:07 +0000) |
- 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*
- *when someone really wants this effect, let me know and I'll recode it*
src/live_effects/Makefile_insert | patch | blob | history | |
src/live_effects/effect.cpp | patch | blob | history | |
src/live_effects/effect.h | patch | blob | history | |
src/live_effects/lpe-slant.cpp | [deleted file] | patch | blob | history |
src/live_effects/lpe-slant.h | [deleted file] | patch | blob | history |
index 60c2ece42998ba872290a44e19ffac1dbf3e5c0e..7f0adf3a60a32ea4b9dfe93519e2a64bacdd577f 100644 (file)
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 \
index f699248e4e411d6b9b5140b8100814f684ddf454..2d2a8cb226163abda689109ddacd549f8a66ff53 100644 (file)
#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"
{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"},
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;
index 7ab4537f9444edcffdae24085d43ca99dc5fa03a..f4287bb521833b8acbb13acb54f59bd1129a19d3 100644 (file)
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
+++ /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
+++ /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