diff options
Diffstat (limited to 'src/libnr')
| -rw-r--r-- | src/libnr/nr-convert2geom.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libnr/nr-convert2geom.h b/src/libnr/nr-convert2geom.h index 95b9eb6f0..c8a139aa2 100644 --- a/src/libnr/nr-convert2geom.h +++ b/src/libnr/nr-convert2geom.h @@ -45,6 +45,14 @@ inline NR::Rect from_2geom(Geom::Rect const & rect2geom) { NR::Rect rect(rect2geom.min(), rect2geom.max()); return rect; } +inline boost::optional<Geom::Rect> to_2geom(boost::optional<NR::Rect> const & rect) { + boost::optional<Geom::Rect> rect2geom; + if (!rect) { + return rect2geom; + } + rect2geom = to_2geom(*rect); + return rect2geom; +} inline NR::scale from_2geom(Geom::Scale const & in) { return NR::scale(in[Geom::X], in[Geom::Y]); |
