Code

add geom helper file. this will contain Inkscape specific geometry calculation method...
authorjohanengelen <johanengelen@users.sourceforge.net>
Mon, 16 Jun 2008 20:53:27 +0000 (20:53 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Mon, 16 Jun 2008 20:53:27 +0000 (20:53 +0000)
src/helper/Makefile_insert
src/helper/geom.cpp [new file with mode: 0644]
src/helper/geom.h [new file with mode: 0644]

index f781332d00ebfe37d63fe30e15738be008ff50dd..99957ab3bbce0f36fdd763121667118d2c7374e4 100644 (file)
@@ -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 (file)
index 0000000..3917218
--- /dev/null
@@ -0,0 +1,33 @@
+#define INKSCAPE_HELPER_GEOM_CPP\r
+\r
+/**\r
+ * Specific geometry functions for Inkscape, not provided my lib2geom.\r
+ *\r
+ * Author:\r
+ *   Johan Engelen <goejendaagh@zonnet.nl>\r
+ *\r
+ * Copyright (C) 2008 Johan Engelen\r
+ *\r
+ * Released under GNU GPL\r
+ */\r
+\r
+#include <2geom/pathvector.h>\r
+#include <2geom/transforms.h>\r
\r
+Geom::Rect\r
+bounds_fast_transformed(Geom::PathVector const & pv, Geom::Matrix const & t)\r
+{\r
+    return Geom::bounds_fast(pv * t);\r
+}\r
+\r
+\r
+/*\r
+  Local Variables:\r
+  mode:c++\r
+  c-file-style:"stroustrup"\r
+  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))\r
+  indent-tabs-mode:nil\r
+  fill-column:99\r
+  End:\r
+*/\r
+// 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 (file)
index 0000000..fbc3f2c
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef INKSCAPE_HELPER_GEOM_H\r
+#define INKSCAPE_HELPER_GEOM_H\r
+\r
+/**\r
+ * Specific geometry functions for Inkscape, not provided my lib2geom.\r
+ *\r
+ * Author:\r
+ *   Johan Engelen <goejendaagh@zonnet.nl>\r
+ *\r
+ * Copyright (C) 2008 Johan Engelen\r
+ *\r
+ * Released under GNU GPL\r
+ */\r
+\r
+#include <2geom/forward.h>\r
+\r
+Geom::Rect bounds_fast_transformed(Geom::PathVector const & pv, Geom::Matrix const & t);\r
+\r
+#endif  // INKSCAPE_HELPER_GEOM_H\r
+\r
+/*\r
+  Local Variables:\r
+  mode:c++\r
+  c-file-style:"stroustrup"\r
+  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))\r
+  indent-tabs-mode:nil\r
+  fill-column:99\r
+  End:\r
+*/\r
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :\r