diff options
| -rw-r--r-- | src/helper/Makefile_insert | 1 | ||||
| -rw-r--r-- | src/helper/geom-curves.h | 39 |
2 files changed, 40 insertions, 0 deletions
diff --git a/src/helper/Makefile_insert b/src/helper/Makefile_insert index 432b3861c..4d1ed6630 100644 --- a/src/helper/Makefile_insert +++ b/src/helper/Makefile_insert @@ -18,6 +18,7 @@ helper_libspchelp_a_SOURCES = \ helper/action.h \ helper/geom.cpp \ helper/geom.h \ + helper/geom-curves.h \ helper/geom-nodetype.cpp \ helper/geom-nodetype.h \ helper/gnome-utils.cpp \ diff --git a/src/helper/geom-curves.h b/src/helper/geom-curves.h new file mode 100644 index 000000000..c718eb515 --- /dev/null +++ b/src/helper/geom-curves.h @@ -0,0 +1,39 @@ +#ifndef INKSCAPE_HELPER_GEOM_CURVES_H
+#define INKSCAPE_HELPER_GEOM_CURVES_H
+
+/**
+ * Specific curve type functions for Inkscape, not provided my lib2geom.
+ *
+ * Author:
+ * Johan Engelen <goejendaagh@zonnet.nl>
+ *
+ * Copyright (C) 2008 Johan Engelen
+ *
+ * Released under GNU GPL
+ */
+
+#include <2geom/hvlinesegment.h>
+
+inline bool is_straight_curve(Geom::Curve const & c) {
+ if( dynamic_cast<Geom::LineSegment const*>(&c) ||
+ dynamic_cast<Geom::HLineSegment const*>(&c) ||
+ dynamic_cast<Geom::VLineSegment const*>(&c) )
+ {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+#endif // INKSCAPE_HELPER_GEOM_CURVES_H
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
|
