diff options
| author | MenTaLguY <mental@rydia.net> | 2007-03-19 00:08:37 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2007-03-19 00:08:37 +0000 |
| commit | d21c7ea311d9ab4bf66a5e999adbbb443954e626 (patch) | |
| tree | dd19e1c5cb3e8b4e024a8878b1f123850b4d0216 /src | |
| parent | Update pedrogui stuff and makefile. Add placeholder for alternate test framew... (diff) | |
| download | inkscape-d21c7ea311d9ab4bf66a5e999adbbb443954e626.tar.gz inkscape-d21c7ea311d9ab4bf66a5e999adbbb443954e626.zip | |
revert reversion -- I had not realized it had already come into use,
but I have no time to fix the code now
(bzr r2706)
Diffstat (limited to 'src')
| -rw-r--r-- | src/libnr/nr-rect.cpp | 10 | ||||
| -rw-r--r-- | src/libnr/nr-rect.h | 5 |
2 files changed, 15 insertions, 0 deletions
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 <libnr/nr-maybe.h> #include <libnr/nr-point-matrix-ops.h> +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; } |
