1 /** \file
2 * @brief LPE sketch effect implementation, see lpe-sketch.cpp.
3 */
4 /* Authors:
5 * Jean-Francois Barraud <jf.barraud@gmail.com>
6 * Johan Engelen <j.b.c.engelen@utwente.nl>
7 *
8 * Copyright (C) 2007 Authors
9 *
10 * Released under GNU GPL, read the file 'COPYING' for more information
11 */
13 #ifndef INKSCAPE_LPE_SKETCH_H
14 #define INKSCAPE_LPE_SKETCH_H
16 #include "live_effects/effect.h"
17 #include "live_effects/parameter/parameter.h"
18 #include "live_effects/parameter/random.h"
19 #include "live_effects/parameter/point.h"
21 #define LPE_SKETCH_USE_CONSTRUCTION_LINES
22 //#define LPE_SKETCH_USE_CURVATURE
24 namespace Inkscape {
25 namespace LivePathEffect {
27 class LPESketch : public Effect {
28 public:
29 LPESketch(LivePathEffectObject *lpeobject);
30 virtual ~LPESketch();
32 virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
34 virtual void doBeforeEffect (SPLPEItem *lpeitem);
36 private:
37 // add the parameters for your effect here:
38 //PointParam testpointA;
39 ScalarParam nbiter_approxstrokes;
40 ScalarParam strokelength;
41 RandomParam strokelength_rdm;
42 ScalarParam strokeoverlap;
43 RandomParam strokeoverlap_rdm;
44 RandomParam ends_tolerance;
45 RandomParam parallel_offset;
46 RandomParam tremble_size;
47 ScalarParam tremble_frequency;
49 #ifdef LPE_SKETCH_USE_CONSTRUCTION_LINES
50 ScalarParam nbtangents;
51 ScalarParam tgtscale;
52 ScalarParam tgtlength;
53 RandomParam tgtlength_rdm;
54 RandomParam tgt_places_rdmness;
55 #ifdef LPE_SKETCH_USE_CURVATURE
56 ScalarParam min_curvature;
57 ScalarParam max_curvature;
58 #endif
59 #endif
60 LPESketch(const LPESketch&);
61 LPESketch& operator=(const LPESketch&);
63 Geom::Piecewise<Geom::D2<Geom::SBasis> > computePerturbation (double s0, double s1);
65 };
67 } //namespace LivePathEffect
68 } //namespace Inkscape
70 #endif
72 /*
73 Local Variables:
74 mode:c++
75 c-file-style:"stroustrup"
76 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
77 indent-tabs-mode:nil
78 fill-column:99
79 End:
80 */
81 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :