summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpe-envelope.h
diff options
context:
space:
mode:
authorBastien Bouclet <bastien.bouclet@gmail.com>2008-05-17 10:48:43 +0000
committerbgk <bgk@users.sourceforge.net>2008-05-17 10:48:43 +0000
commit1711fdeb535dd756a0a1b57b4f792eec959c70be (patch)
treec71d91deafc84c756c49f6bb21516705dc61e2bd /src/live_effects/lpe-envelope.h
parentFix LPE for groups bounding box calculation by using the SPItem->getBounds me... (diff)
downloadinkscape-1711fdeb535dd756a0a1b57b4f792eec959c70be.tar.gz
inkscape-1711fdeb535dd756a0a1b57b4f792eec959c70be.zip
New LPE : Envelope deformation
(bzr r5684)
Diffstat (limited to 'src/live_effects/lpe-envelope.h')
-rwxr-xr-xsrc/live_effects/lpe-envelope.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/live_effects/lpe-envelope.h b/src/live_effects/lpe-envelope.h
new file mode 100755
index 000000000..282169674
--- /dev/null
+++ b/src/live_effects/lpe-envelope.h
@@ -0,0 +1,59 @@
+#ifndef INKSCAPE_LPE_ENVELOPE_H
+#define INKSCAPE_LPE_ENVELOPE_H
+
+/*
+ * Inkscape::LPEEnvelope
+ *
+ * Copyright (C) Steren Giannini 2008 <steren.giannini@gmail.com>
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#include "live_effects/effect.h"
+#include "live_effects/parameter/path.h"
+#include "live_effects/parameter/enum.h"
+#include "live_effects/parameter/bool.h"
+
+#include <2geom/sbasis.h>
+#include <2geom/sbasis-geometric.h>
+#include <2geom/bezier-to-sbasis.h>
+#include <2geom/sbasis-to-bezier.h>
+#include <2geom/d2.h>
+#include <2geom/piecewise.h>
+
+#include "live_effects/lpegroupbbox.h"
+
+namespace Inkscape {
+namespace LivePathEffect {
+
+class LPEEnvelope : public Effect, GroupBBoxEffect {
+public:
+ LPEEnvelope(LivePathEffectObject *lpeobject);
+ virtual ~LPEEnvelope();
+
+ virtual void doBeforeEffect (SPLPEItem *lpeitem);
+
+ virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
+
+ virtual void resetDefaults(SPItem * item);
+
+ virtual void transform_multiply(Geom::Matrix const& postmul, bool set);
+
+private:
+ PathParam bend_path1;
+ PathParam bend_path2;
+ PathParam bend_path3;
+ PathParam bend_path4;
+ BoolParam xx;
+ BoolParam yy;
+
+ void on_pattern_pasted();
+
+ LPEEnvelope(const LPEEnvelope&);
+ LPEEnvelope& operator=(const LPEEnvelope&);
+};
+
+}; //namespace LivePathEffect
+}; //namespace Inkscape
+
+#endif