diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-06-16 20:53:27 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-06-16 20:53:27 +0000 |
| commit | ab9c245802f6680c9ff50878fd4b51d1a940541a (patch) | |
| tree | cf8284c39acf6f67f2344cafe50a5bb368ee4193 /src | |
| parent | Merge interfaces and element types (diff) | |
| download | inkscape-ab9c245802f6680c9ff50878fd4b51d1a940541a.tar.gz inkscape-ab9c245802f6680c9ff50878fd4b51d1a940541a.zip | |
add geom helper file. this will contain Inkscape specific geometry calculation methods that are not (yet, if ever) provided by lib2geom.
(bzr r5965)
Diffstat (limited to 'src')
| -rw-r--r-- | src/helper/Makefile_insert | 2 | ||||
| -rw-r--r-- | src/helper/geom.cpp | 33 | ||||
| -rw-r--r-- | src/helper/geom.h | 30 |
3 files changed, 65 insertions, 0 deletions
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 <goejendaagh@zonnet.nl>
+ *
+ * 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 <goejendaagh@zonnet.nl>
+ *
+ * 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 :
|
