diff options
Diffstat (limited to 'src/libnr/nr-rect.cpp')
| -rw-r--r-- | src/libnr/nr-rect.cpp | 10 |
1 files changed, 10 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) { |
