diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-06-08 14:35:38 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-06-08 14:35:38 +0000 |
| commit | 7531c220483cca211e8c925ec02c9642aaf47e0e (patch) | |
| tree | 1d3bc6ddd932b9b4229b6dd1ddea6383e8ee86cb /src | |
| parent | Warning cleanup (diff) | |
| download | inkscape-7531c220483cca211e8c925ec02c9642aaf47e0e.tar.gz inkscape-7531c220483cca211e8c925ec02c9642aaf47e0e.zip | |
add conversion from NR::Rect to Geom::Rect
(bzr r5848)
Diffstat (limited to 'src')
| -rw-r--r-- | src/libnr/nr-convert2geom.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libnr/nr-convert2geom.h b/src/libnr/nr-convert2geom.h index 5e6021569..c92c34011 100644 --- a/src/libnr/nr-convert2geom.h +++ b/src/libnr/nr-convert2geom.h @@ -20,7 +20,6 @@ inline Geom::Point to_2geom(NR::Point const & _pt) { return Geom::Point(_pt[0], _pt[1]); } - inline NR::Point from_2geom(Geom::Point const & _pt) { return NR::Point(_pt[0], _pt[1]); } @@ -29,7 +28,6 @@ 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; } - inline NR::Matrix from_2geom(Geom::Matrix const & mat) { NR::Matrix mat2geom(mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]); return mat2geom; @@ -39,6 +37,10 @@ inline Geom::Translate to_2geom(NR::translate const & mat) { return Geom::Translate( mat.offset[0], mat.offset[1] ); } +inline Geom::Rect to_2geom(NR::Rect const & rect) { + Geom::Rect rect2geom(to_2geom(rect.min()), to_2geom(rect.max())); + return rect2geom; +} inline NR::Rect from_2geom(Geom::Rect const & rect2geom) { NR::Rect rect(rect2geom.min(), rect2geom.max()); return rect; |
