Code

c9ae68bd127498c5fdbd1a8dab779a5b31025f41
[inkscape.git] / src / libnr / nr-convert2geom.h
1 #ifndef INKSCAPE_LIBNR_CONVERT2GEOM_H\r
2 #define INKSCAPE_LIBNR_CONVERT2GEOM_H\r
3 \r
4 /*\r
5  * Converts between NR and 2Geom types.\r
6  *\r
7 * Copyright (C) Johan Engelen 2008 <j.b.c.engelen@utwente.nl>\r
8  *\r
9  * Released under GNU GPL, read the file 'COPYING' for more information\r
10  */\r
11 \r
12 #include <2geom/matrix.h>\r
13 #include <libnr/nr-matrix.h>\r
14 #include <2geom/d2.h>\r
15 #include <libnr/nr-rect.h>\r
16 \r
17 inline Geom::Matrix to_2geom(NR::Matrix const & mat) {\r
18     Geom::Matrix mat2geom(mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]);\r
19     return mat2geom;\r
20 }\r
21 \r
22 inline NR::Rect from_2geom(Geom::Rect const & rect2geom) {\r
23     NR::Rect rect(rect2geom.min(), rect2geom.max());\r
24     return rect;\r
25 }\r
26 \r
27 #endif\r
28 \r
29 /*\r
30   Local Variables:\r
31   mode:c++\r
32   c-file-style:"stroustrup"\r
33   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))\r
34   indent-tabs-mode:nil\r
35   fill-column:99\r
36   End:\r
37 */\r
38 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :\r