From: buliabyak Date: Mon, 19 Mar 2007 03:00:31 +0000 (+0000) Subject: add ::upgrade for NRRectL X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5f8d99126c6273d77e169cb55ec199410b3b3808;p=inkscape.git add ::upgrade for NRRectL --- diff --git a/src/libnr/nr-rect-l.cpp b/src/libnr/nr-rect-l.cpp index 40db67a1e..3b00acd03 100644 --- a/src/libnr/nr-rect-l.cpp +++ b/src/libnr/nr-rect-l.cpp @@ -1,5 +1,13 @@ #include +NR::Maybe NRRectL::upgrade() const { + if (nr_rect_l_test_empty(this)) { + return NR::Nothing(); + } else { + return NR::Rect(NR::Point(x0, y0), NR::Point(x1, y1)); + } +} + namespace NR { IRect::IRect(Rect const &r) : diff --git a/src/libnr/nr-rect-l.h b/src/libnr/nr-rect-l.h index 756a537b0..b84a8f0cb 100644 --- a/src/libnr/nr-rect-l.h +++ b/src/libnr/nr-rect-l.h @@ -2,13 +2,15 @@ #define SEEN_NR_RECT_L_H #include +#include +#include +#include struct NRRectL { + NR::Maybe upgrade() const; NR::ICoord x0, y0, x1, y1; }; -#include -#include namespace NR {