diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2011-06-23 22:33:00 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2011-06-23 22:33:00 +0000 |
| commit | c213160c0dc2ad5807c23947ae61c8fc93f32b3e (patch) | |
| tree | e62493cec1a4c2943f1eccdb9400a39774b93027 /src | |
| parent | Remove more of libnr (diff) | |
| download | inkscape-c213160c0dc2ad5807c23947ae61c8fc93f32b3e.tar.gz inkscape-c213160c0dc2ad5807c23947ae61c8fc93f32b3e.zip | |
Fix problems in GenericRect constructors
(bzr r10347.1.3)
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. |
