summaryrefslogtreecommitdiffstats
path: root/src/live_effects/spiro.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-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