Code

warning cleanup
[inkscape.git] / src / live_effects / lpe-perspective_path.h
1 #ifndef INKSCAPE_LPE_PERSPECTIVE_PATH_H
2 #define INKSCAPE_LPE_PERSPECTIVE_PATH_H
4 /** \file
5  * LPE <perspective_path> implementation, see lpe-perspective_path.cpp.
6  */
8 /*
9  * Authors:
10  *   Johan Engelen
11 *
12 * Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl>
13  *
14  * Released under GNU GPL, read the file 'COPYING' for more information
15  */
17 #include "live_effects/effect.h"
18 #include "live_effects/parameter/parameter.h"
19 #include "live_effects/parameter/bool.h"
20 #include "live_effects/lpegroupbbox.h"
22 #include <vector>
23 #include "2geom/point.h"
25 namespace Inkscape {
26 namespace LivePathEffect {
28 namespace PP {
29   // we need a separate namespace to avoid clashes with other LPEs
30   class KnotHolderEntityOffset;
31 }
33 class LPEPerspectivePath : public Effect, GroupBBoxEffect {
34 public:
35     LPEPerspectivePath(LivePathEffectObject *lpeobject);
36     virtual ~LPEPerspectivePath();
37     
38     virtual void doBeforeEffect (SPLPEItem *lpeitem);
40     virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
42     /* the knotholder entity classes must be declared friends */
43     friend class PP::KnotHolderEntityOffset;
45 private:
46     // add the parameters for your effect here:
47     ScalarParam scalex;
48     ScalarParam scaley;
49     // TODO: rewrite this using a PointParam instead of two ScalarParams
50     ScalarParam offsetx;
51     ScalarParam offsety;
52     BoolParam uses_plane_xy;
53     // there are all kinds of parameters. Check the /live_effects/parameter directory which types exist!
55     Geom::Point orig;
57     LPEPerspectivePath(const LPEPerspectivePath&);
58     LPEPerspectivePath& operator=(const LPEPerspectivePath&);
60     std::vector<Geom::Point> handles;
61     double tmat[3][4];
62 };
64 } //namespace LivePathEffect
65 } //namespace Inkscape
67 #endif