From: mental Date: Mon, 19 Mar 2007 00:08:37 +0000 (+0000) Subject: revert reversion -- I had not realized it had already come into use, X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e4f1665cb32d2fa9d43546b176ac627ce6cbb537;p=inkscape.git revert reversion -- I had not realized it had already come into use, but I have no time to fix the code now --- diff --git a/src/libnr/nr-rect.cpp b/src/libnr/nr-rect.cpp index 72bced37b..70ab71850 100644 --- a/src/libnr/nr-rect.cpp +++ b/src/libnr/nr-rect.cpp @@ -247,6 +247,16 @@ Rect::Rect(const Point &p0, const Point &p1) _max(std::max(p0[X], p1[X]), std::max(p0[Y], p1[Y])) {} +Rect::Rect(NRRect *r) + : _min(r->x0, r->y0), + _max(r->x1, r->y1) +{} + +Rect::Rect(NRRectL *r) + : _min(r->x0, r->y0), + _max(r->x1, r->y1) +{} + /** returns the four corners of the rectangle in the correct winding order */ Point Rect::corner(unsigned i) const { switch (i % 4) { diff --git a/src/libnr/nr-rect.h b/src/libnr/nr-rect.h index 04f446487..2439df95d 100644 --- a/src/libnr/nr-rect.h +++ b/src/libnr/nr-rect.h @@ -25,6 +25,9 @@ #include #include +struct NRRect; +struct NRRectL; + namespace NR { struct Matrix; @@ -39,6 +42,8 @@ class Rect { public: Rect() : _min(-_inf(), -_inf()), _max(_inf(), _inf()) {} Rect(Point const &p0, Point const &p1); + Rect(NRRect *r); + Rect(NRRectL *r); Point const &min() const { return _min; } Point const &max() const { return _max; }