Code

a2f451e6558d412e0348a2cae18f75ac6b984c9e
[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 class LPEPerspectivePath : public Effect, GroupBBoxEffect {
29 public:
30     LPEPerspectivePath(LivePathEffectObject *lpeobject);
31     virtual ~LPEPerspectivePath();
32     
33     virtual void doBeforeEffect (SPLPEItem *lpeitem);
35     virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
37 private:
38     // add the parameters for your effect here:
39     ScalarParam scalex;
40     ScalarParam scaley;
41     ScalarParam offsetx;
42     ScalarParam offsety;
43     BoolParam uses_plane_xy;
44     // there are all kinds of parameters. Check the /live_effects/parameter directory which types exist!
46     LPEPerspectivePath(const LPEPerspectivePath&);
47     LPEPerspectivePath& operator=(const LPEPerspectivePath&);
49     std::vector<Geom::Point> handles;
50     double tmat[3][4];
51     
52     bool groupSpecialBehavior;
53 };
55 } //namespace LivePathEffect
56 } //namespace Inkscape
58 #endif