index d404e0f6752e69a39f00ce9915fcc3c1c9be15ad..f1578d5bfdb0666803a04af2a9e975efbeb1a2d4 100644 (file)
-#ifndef INKSCAPE_LPE_PATHALONGPATH_H\r
-#define INKSCAPE_LPE_PATHALONGPATH_H\r
-\r
-/*\r
- * Inkscape::LPEPathAlongPath\r
- *\r
-* Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl>\r
- *\r
- * Released under GNU GPL, read the file 'COPYING' for more information\r
- */\r
-\r
-#include "live_effects/effect.h"\r
-#include "live_effects/parameter/path.h"\r
-#include "live_effects/parameter/enum.h"\r
-#include "live_effects/parameter/bool.h"\r
-\r
-namespace Inkscape {\r
-namespace LivePathEffect {\r
-\r
-enum PAPCopyType {\r
- PAPCT_SINGLE = 0,\r
- PAPCT_SINGLE_STRETCHED,\r
- PAPCT_REPEATED,\r
- PAPCT_REPEATED_STRETCHED,\r
- PAPCT_END // This must be last\r
-};\r
-\r
-class LPEPathAlongPath : public Effect {\r
-public:\r
- LPEPathAlongPath(LivePathEffectObject *lpeobject);\r
- virtual ~LPEPathAlongPath();\r
-\r
- virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in);\r
-\r
- virtual void resetDefaults(SPItem * item);\r
-\r
-private:\r
- PathParam bend_path;\r
- EnumParam<PAPCopyType> copytype;\r
- ScalarParam prop_scale;\r
- BoolParam scale_y_rel;\r
- ScalarParam spacing;\r
- ScalarParam normal_offset;\r
- ScalarParam tang_offset;\r
- BoolParam vertical_pattern;\r
-\r
- void on_pattern_pasted();\r
-\r
- LPEPathAlongPath(const LPEPathAlongPath&);\r
- LPEPathAlongPath& operator=(const LPEPathAlongPath&);\r
-};\r
-\r
-}; //namespace LivePathEffect\r
-}; //namespace Inkscape\r
-\r
-#endif\r
+#ifndef INKSCAPE_LPE_PATHALONGPATH_H
+#define INKSCAPE_LPE_PATHALONGPATH_H
+
+/*
+ * Inkscape::LPEPathAlongPath
+ *
+ * Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl>
+ * 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 {
+
+//for Bend path on group : we need information concerning the group Bounding box
+class LPEPathAlongPath : public Effect, LivePathEffect_group_bbox {
+public:
+ LPEPathAlongPath(LivePathEffectObject *lpeobject);
+ virtual ~LPEPathAlongPath();
+
+ virtual void doBeforeEffect (SPLPEItem *lpeitem);
+
+ virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in);
+
+ virtual void resetDefaults(SPItem * item);
+
+ virtual void transform_multiply(Geom::Matrix const& postmul, bool set);
+
+private:
+ PathParam bend_path;
+ ScalarParam prop_scale;
+ BoolParam scale_y_rel;
+ BoolParam vertical_pattern;
+
+ bool groupSpecialBehavior;
+
+ void on_pattern_pasted();
+
+ LPEPathAlongPath(const LPEPathAlongPath&);
+ LPEPathAlongPath& operator=(const LPEPathAlongPath&);
+};
+
+}; //namespace LivePathEffect
+}; //namespace Inkscape
+
+#endif