Code

fix shift+middle button zoom area when there are other modifiers in the mask; safe...
[inkscape.git] / src / live_effects / lpe-sketch.h
index 95d9ea94f0fa1ac7955cadf1d14106671c8710f7..e82dab5c36091f9c72f837668291cddab31c2990 100644 (file)
@@ -1,24 +1,26 @@
-#ifndef INKSCAPE_LPE_SKETCH_H
-#define INKSCAPE_LPE_SKETCH_H
-
 /** \file
- * LPE <sketch> implementation, see lpe-sketch.cpp.
+ * @brief LPE sketch effect implementation, see lpe-sketch.cpp.
  */
-
-/*
- * Authors:
- *   JFB, but derived from Johan Engelen!
-*
-* Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl>
+/* Authors:
+ *   Jean-Francois Barraud <jf.barraud@gmail.com>
+ *   Johan Engelen <j.b.c.engelen@utwente.nl>
+ *
+ * Copyright (C) 2007 Authors
  *
  * Released under GNU GPL, read the file 'COPYING' for more information
  */
 
+#ifndef INKSCAPE_LPE_SKETCH_H
+#define INKSCAPE_LPE_SKETCH_H
+
 #include "live_effects/effect.h"
 #include "live_effects/parameter/parameter.h"
 #include "live_effects/parameter/random.h"
 #include "live_effects/parameter/point.h"
 
+#define LPE_SKETCH_USE_CONSTRUCTION_LINES
+//#define LPE_SKETCH_USE_CURVATURE
+
 namespace Inkscape {
 namespace LivePathEffect {
 
@@ -27,11 +29,9 @@ public:
     LPESketch(LivePathEffectObject *lpeobject);
     virtual ~LPESketch();
 
-//  Choose to implement one of the doEffect functions. You can delete or comment out the others.
-//    virtual void doEffect (SPCurve * curve);
-//    virtual NArtBpath * doEffect_nartbpath (NArtBpath * path_in);
-//    virtual std::vector<Geom::Path> doEffect_path (std::vector<Geom::Path> & path_in);
-    virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2_in);
+    virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
+
+    virtual void doBeforeEffect (SPLPEItem *lpeitem);
 
 private:
     // add the parameters for your effect here:
@@ -45,11 +45,18 @@ private:
     RandomParam parallel_offset;
     RandomParam tremble_size;
     ScalarParam tremble_frequency;
+
+#ifdef LPE_SKETCH_USE_CONSTRUCTION_LINES
     ScalarParam nbtangents;
     ScalarParam tgtscale;
     ScalarParam tgtlength;
     RandomParam tgtlength_rdm;
-
+    RandomParam tgt_places_rdmness;
+#ifdef LPE_SKETCH_USE_CURVATURE
+    ScalarParam min_curvature;
+    ScalarParam max_curvature;
+#endif
+#endif
     LPESketch(const LPESketch&);
     LPESketch& operator=(const LPESketch&);
 
@@ -61,3 +68,14 @@ private:
 } //namespace Inkscape
 
 #endif
+
+/*
+  Local Variables:
+  mode:c++
+  c-file-style:"stroustrup"
+  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+  indent-tabs-mode:nil
+  fill-column:99
+  End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :