From a7fb5d4ab8278cb2480727d9b273d2887fdb7cb4 Mon Sep 17 00:00:00 2001 From: johanengelen Date: Sat, 2 Aug 2008 23:01:15 +0000 Subject: [PATCH] add is_straight_curve in geom-curves.h helper file --- src/helper/Makefile_insert | 1 + src/helper/geom-curves.h | 39 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 src/helper/geom-curves.h 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 + * + * 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(&c) || + dynamic_cast(&c) || + dynamic_cast(&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 : -- 2.30.2