From d3ac4fc7b7c826ebe5c81d3412c8ee987ae0eee5 Mon Sep 17 00:00:00 2001 From: johanengelen Date: Mon, 16 Jun 2008 20:53:27 +0000 Subject: [PATCH] add geom helper file. this will contain Inkscape specific geometry calculation methods that are not (yet, if ever) provided by lib2geom. --- src/helper/Makefile_insert | 2 ++ src/helper/geom.cpp | 33 +++++++++++++++++++++++++++++++++ src/helper/geom.h | 30 ++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 src/helper/geom.cpp create mode 100644 src/helper/geom.h diff --git a/src/helper/Makefile_insert b/src/helper/Makefile_insert index f781332d0..99957ab3b 100644 --- a/src/helper/Makefile_insert +++ b/src/helper/Makefile_insert @@ -16,6 +16,8 @@ helper/unit-menu.$(OBJEXT): helper/sp-marshal.h helper_libspchelp_a_SOURCES = \ helper/action.cpp \ helper/action.h \ + helper/geom.cpp \ + helper/geom.h \ helper/gnome-utils.cpp \ helper/gnome-utils.h \ helper/helper-forward.h \ diff --git a/src/helper/geom.cpp b/src/helper/geom.cpp new file mode 100644 index 000000000..3917218bb --- /dev/null +++ b/src/helper/geom.cpp @@ -0,0 +1,33 @@ +#define INKSCAPE_HELPER_GEOM_CPP + +/** + * Specific geometry functions for Inkscape, not provided my lib2geom. + * + * Author: + * Johan Engelen + * + * Copyright (C) 2008 Johan Engelen + * + * Released under GNU GPL + */ + +#include <2geom/pathvector.h> +#include <2geom/transforms.h> + +Geom::Rect +bounds_fast_transformed(Geom::PathVector const & pv, Geom::Matrix const & t) +{ + return Geom::bounds_fast(pv * t); +} + + +/* + 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 : \ No newline at end of file diff --git a/src/helper/geom.h b/src/helper/geom.h new file mode 100644 index 000000000..fbc3f2c00 --- /dev/null +++ b/src/helper/geom.h @@ -0,0 +1,30 @@ +#ifndef INKSCAPE_HELPER_GEOM_H +#define INKSCAPE_HELPER_GEOM_H + +/** + * Specific geometry functions for Inkscape, not provided my lib2geom. + * + * Author: + * Johan Engelen + * + * Copyright (C) 2008 Johan Engelen + * + * Released under GNU GPL + */ + +#include <2geom/forward.h> + +Geom::Rect bounds_fast_transformed(Geom::PathVector const & pv, Geom::Matrix const & t); + +#endif // INKSCAPE_HELPER_GEOM_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