summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-01-02 17:34:09 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-01-02 17:34:09 +0000
commitd8e4e572b9a4a4149a7f2569b6f695f0be4db59c (patch)
tree441a82c4867cd80851b591c15205687719060da8 /src
parentFix LP bug #179328 (diff)
downloadinkscape-d8e4e572b9a4a4149a7f2569b6f695f0be4db59c.tar.gz
inkscape-d8e4e572b9a4a4149a7f2569b6f695f0be4db59c.zip
add libnr <=> 2geom conversion helper headerfile
(bzr r4366)
Diffstat (limited to 'src')
-rw-r--r--src/libnr/Makefile_insert1
-rw-r--r--src/libnr/nr-convert2geom.h31
2 files changed, 32 insertions, 0 deletions
diff --git a/src/libnr/Makefile_insert b/src/libnr/Makefile_insert
index 72e5b56e7..53d15d35b 100644
--- a/src/libnr/Makefile_insert
+++ b/src/libnr/Makefile_insert
@@ -23,6 +23,7 @@ libnr_libnr_a_SOURCES = \
libnr/nr-compose-transform.h \
libnr/nr-compose.cpp \
libnr/nr-compose.h \
+ libnr/nr-convert2geom.h \
libnr/nr-convex-hull.h \
libnr/nr-coord.h \
libnr/nr-dim2.h \
diff --git a/src/libnr/nr-convert2geom.h b/src/libnr/nr-convert2geom.h
new file mode 100644
index 000000000..67b174b3a
--- /dev/null
+++ b/src/libnr/nr-convert2geom.h
@@ -0,0 +1,31 @@
+#ifndef INKSCAPE_LIBNR_CONVERT2GEOM_H
+#define INKSCAPE_LIBNR_CONVERT2GEOM_H
+
+/*
+ * Converts between NR and 2Geom types.
+ *
+* Copyright (C) Johan Engelen 2008 <j.b.c.engelen@utwente.nl>
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#include <2geom/matrix.h>
+#include <libnr/nr-matrix.h>
+
+inline Geom::Matrix to_2geom(NR::Matrix const & mat) {
+ Geom::Matrix mat2geom(mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]);
+ return mat2geom;
+}
+
+#endif
+
+/*
+ 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 :