diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-08-02 23:01:15 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-08-02 23:01:15 +0000 |
| commit | e02ae0d7b1ba08753a627b55e8d7d8e2aa5d3465 (patch) | |
| tree | 74a7ec4808643a0218c60b93c2396e497be3c497 /src | |
| parent | simplify pathv_to_linear_and_cubic_beziers a bit (diff) | |
| download | inkscape-e02ae0d7b1ba08753a627b55e8d7d8e2aa5d3465.tar.gz inkscape-e02ae0d7b1ba08753a627b55e8d7d8e2aa5d3465.zip | |
add is_straight_curve in geom-curves.h helper file
(bzr r6537)
Diffstat (limited to 'src')
| -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 :
|
