summaryrefslogtreecommitdiffstats
path: root/src/live_effects/spiro.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 11:50:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 11:50:49 +0000
commitc853ffb5b2f75f5a889ed2e3ef89b818a736e87a (patch)
tree7d13a0883bb7936b84d6ecdd7bc332b41ed04bee /src/live_effects/spiro.h
parentInitial commit. (diff)
downloadinkscape-upstream.tar.xz
inkscape-upstream.zip
Adding upstream version 1.3+ds.upstream/1.3+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/live_effects/spiro.h')
-rw-r--r--src/live_effects/spiro.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/live_effects/spiro.h b/src/live_effects/spiro.h
new file mode 100644
index 0000000..3ca1fb8
--- /dev/null
+++ b/src/live_effects/spiro.h
@@ -0,0 +1,42 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/** @file
+ * C implementation of third-order polynomial spirals.
+ *//*
+ * Authors: see git history
+ * Raph Levien
+ * Johan Engelen
+ *
+ * Copyright (C) 2018 Authors
+ * Released under GNU GPL v2+, read the file 'COPYING' for more information.
+ */
+#ifndef INKSCAPE_SPIRO_H
+#define INKSCAPE_SPIRO_H
+
+#include "live_effects/spiro-converters.h"
+#include <2geom/forward.h>
+
+class SPCurve;
+
+namespace Spiro {
+
+struct spiro_cp {
+ double x;
+ double y;
+ char ty;
+};
+
+
+void spiro_run(const spiro_cp *src, int src_len, SPCurve &curve);
+void spiro_run(const spiro_cp *src, int src_len, Geom::Path &path);
+
+/* the following methods are only for expert use: */
+typedef struct spiro_seg_s spiro_seg;
+spiro_seg * run_spiro(const spiro_cp *src, int n);
+void free_spiro(spiro_seg *s);
+void spiro_to_otherpath(const spiro_seg *s, int n, ConverterBase &bc);
+double get_knot_th(const spiro_seg *s, int i);
+
+
+} // namespace Spiro
+
+#endif // INKSCAPE_SPIRO_H