1 #ifndef INKSCAPE_LPE_DYNASTROKE_H
2 #define INKSCAPE_LPE_DYNASTROKE_H
4 /** \file
5 * LPE <dynastroke> implementation, see lpe-dynastroke.cpp.
6 */
8 /*
9 * Authors:
10 * JFB, but derived from Johan Engelen!
11 *
12 * Copyright (C) JF Barraud 2008 <jf.barraud@gmail.com>
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/enum.h"
20 #include "live_effects/parameter/path.h"
21 #include "live_effects/parameter/bool.h"
23 namespace Inkscape {
24 namespace LivePathEffect {
26 enum DynastrokeMethod {
27 DSM_ELLIPTIC_PEN = 0,
28 DSM_THICKTHIN_FAST,
29 DSM_THICKTHIN_SLOW,
30 DSM_END // This must be last
31 };
32 enum DynastrokeCappingType {
33 DSCT_SHARP = 0,
34 DSCT_ROUND,
35 //DSCT_CUSTOM,
36 DSCT_END // This must be last
37 };
40 class LPEDynastroke : public Effect {
41 public:
42 LPEDynastroke(LivePathEffectObject *lpeobject);
43 virtual ~LPEDynastroke();
45 virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
47 private:
48 EnumParam<DynastrokeMethod> method;
49 ScalarParam width;
50 ScalarParam roundness;
51 ScalarParam angle;
52 //BoolParam modulo_pi;
53 EnumParam<DynastrokeCappingType> start_cap;
54 EnumParam<DynastrokeCappingType> end_cap;
55 ScalarParam growfor;
56 ScalarParam fadefor;
57 BoolParam round_ends;
58 PathParam capping;
60 LPEDynastroke(const LPEDynastroke&);
61 LPEDynastroke& operator=(const LPEDynastroke&);
62 };
64 } //namespace LivePathEffect
65 } //namespace Inkscape
67 #endif