1 #ifndef INKSCAPE_LPE_TANGENT_TO_CURVE_H
2 #define INKSCAPE_LPE_TANGENT_TO_CURVE_H
4 /** \file
5 * LPE <tangent_to_curve> implementation, see lpe-tangent_to_curve.cpp.
6 */
8 /*
9 * Authors:
10 * Johan Engelen
11 * Maximilian Albert
12 *
13 * Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl>
14 * Copyright (C) Maximilian Albert 2008 <maximilian.albert@gmail.com>
15 *
16 * Released under GNU GPL, read the file 'COPYING' for more information
17 */
19 #include "live_effects/effect.h"
20 #include "live_effects/parameter/parameter.h"
21 #include "live_effects/parameter/point.h"
23 namespace Inkscape {
24 namespace LivePathEffect {
26 class LPETangentToCurve : public Effect {
27 public:
28 LPETangentToCurve(LivePathEffectObject *lpeobject);
29 virtual ~LPETangentToCurve();
31 bool providesKnotholder() { return true; }
33 virtual Geom::Piecewise<Geom::D2<Geom::SBasis> >
34 doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
36 /* the knotholder entity classes must be declared friends */
37 friend class KnotHolderEntityLeftEnd;
38 friend class KnotHolderEntityRightEnd;
39 friend class KnotHolderEntityAttachPt;
41 private:
42 ScalarParam angle;
44 ScalarParam t_attach;
45 ScalarParam length_left;
46 ScalarParam length_right;
48 Geom::Point ptA; // point of attachment to the curve
49 Geom::Point derivA;
51 Geom::Point C; // left end of tangent
52 Geom::Point D; // right end of tangent
54 LPETangentToCurve(const LPETangentToCurve&);
55 LPETangentToCurve& operator=(const LPETangentToCurve&);
56 };
58 } //namespace LivePathEffect
59 } //namespace Inkscape
61 #endif