Code

d8049c176d7ae193770cd1edca90746fabcd37d3
[inkscape.git] / src / live_effects / lpe-tangent_to_curve.h
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     virtual Geom::Piecewise<Geom::D2<Geom::SBasis> >
32       doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
34     /* the knotholder functions must be declared friends */
35     friend NR::Point attach_pt_get(SPItem *item);
36     friend void attach_pt_set(SPItem *item, NR::Point const &p, NR::Point const &origin, guint state);
38 private:
39     ScalarParam t_attach;
41     Geom::Point ptA;
42     Geom::Point derivA;
44     LPETangentToCurve(const LPETangentToCurve&);
45     LPETangentToCurve& operator=(const LPETangentToCurve&);
46 };
48 } //namespace LivePathEffect
49 } //namespace Inkscape
51 #endif