summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpe-dynastroke.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/live_effects/lpe-dynastroke.h')
-rw-r--r--src/live_effects/lpe-dynastroke.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/live_effects/lpe-dynastroke.h b/src/live_effects/lpe-dynastroke.h
new file mode 100644
index 0000000..ae1c511
--- /dev/null
+++ b/src/live_effects/lpe-dynastroke.h
@@ -0,0 +1,68 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+#ifndef INKSCAPE_LPE_DYNASTROKE_H
+#define INKSCAPE_LPE_DYNASTROKE_H
+
+/** \file
+ * LPE <dynastroke> implementation, see lpe-dynastroke.cpp.
+ */
+
+/*
+ * Authors:
+ * JFB, but derived from Johan Engelen!
+ *
+ * Copyright (C) JF Barraud 2008 <jf.barraud@gmail.com>
+ *
+ * Released under GNU GPL v2+, read the file 'COPYING' for more information.
+ */
+
+#include "live_effects/parameter/enum.h"
+#include "live_effects/effect.h"
+#include "live_effects/parameter/parameter.h"
+#include "live_effects/parameter/path.h"
+#include "live_effects/parameter/bool.h"
+
+namespace Inkscape {
+namespace LivePathEffect {
+
+enum DynastrokeMethod {
+ DSM_ELLIPTIC_PEN = 0,
+ DSM_THICKTHIN_FAST,
+ DSM_THICKTHIN_SLOW,
+ DSM_END // This must be last
+};
+enum DynastrokeCappingType {
+ DSCT_SHARP = 0,
+ DSCT_ROUND,
+ //DSCT_CUSTOM,
+ DSCT_END // This must be last
+};
+
+
+class LPEDynastroke : public Effect {
+public:
+ LPEDynastroke(LivePathEffectObject *lpeobject);
+ ~LPEDynastroke() override;
+
+ Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in) override;
+
+private:
+ EnumParam<DynastrokeMethod> method;
+ ScalarParam width;
+ ScalarParam roundness;
+ ScalarParam angle;
+ //BoolParam modulo_pi;
+ EnumParam<DynastrokeCappingType> start_cap;
+ EnumParam<DynastrokeCappingType> end_cap;
+ ScalarParam growfor;
+ ScalarParam fadefor;
+ BoolParam round_ends;
+ PathParam capping;
+
+ LPEDynastroke(const LPEDynastroke&) = delete;
+ LPEDynastroke& operator=(const LPEDynastroke&) = delete;
+};
+
+} //namespace LivePathEffect
+} //namespace Inkscape
+
+#endif