From 6d91c13219e94772b4cbd5fe55637c6d0b2bc080 Mon Sep 17 00:00:00 2001 From: johanengelen Date: Wed, 2 Jan 2008 17:34:09 +0000 Subject: [PATCH] add libnr <=> 2geom conversion helper headerfile --- src/libnr/Makefile_insert | 1 + src/libnr/nr-convert2geom.h | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 src/libnr/nr-convert2geom.h 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 + * + * Released under GNU GPL, read the file 'COPYING' for more information + */ + +#include <2geom/matrix.h> +#include + +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 : -- 2.30.2