diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/2geom/generic-rect.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/2geom/generic-rect.h b/src/2geom/generic-rect.h index 9a839d735..d60c4bb0f 100644 --- a/src/2geom/generic-rect.h +++ b/src/2geom/generic-rect.h @@ -77,8 +77,13 @@ public: } /** @brief Create a rectangle from two points. */ GenericRect(CPoint const &a, CPoint const &b) { - f[X] = Interval(a[X], b[X]); - f[Y] = Interval(a[Y], b[Y]); + f[X] = CInterval(a[X], b[X]); + f[Y] = CInterval(a[Y], b[Y]); + } + /** @brief Create rectangle from coordinates of two points. */ + GenericRect(C x0, C y0, C x1, C y1) { + f[X] = CInterval(x0, x1); + f[Y] = CInterval(y0, y1); } /** @brief Create a rectangle from a range of points. * The resulting rectangle will contain all ponts from the range. @@ -114,13 +119,6 @@ public: GenericRect<C> result(xy, xy + wh); return result; } - /** @brief Create rectangle from two points. */ - static GenericRect<C> from_xyxy(C x0, C x1, C y0, C y1) { - CPoint p0(x0, y0); - CPoint p1(x1, y1); - GenericRect<C> result(p0, p1); - return result; - } /// @} /// @name Inspect dimensions. |
