diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2011-06-23 23:00:22 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2011-06-23 23:00:22 +0000 |
| commit | 653db8249ff01454821f2a2326317f4df9c7ab23 (patch) | |
| tree | c5c206912e2426847330d03b9aa667355d2d450c /src | |
| parent | Fix problems in GenericRect constructors (diff) | |
| download | inkscape-653db8249ff01454821f2a2326317f4df9c7ab23.tar.gz inkscape-653db8249ff01454821f2a2326317f4df9c7ab23.zip | |
Pull 2Geom revision 2013 (extra constructors for Rect).
(bzr r10347.1.4)
Diffstat (limited to 'src')
| -rw-r--r-- | src/2geom/rect.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/2geom/rect.h b/src/2geom/rect.h index 72b659a81..e9f6cbeb7 100644 --- a/src/2geom/rect.h +++ b/src/2geom/rect.h @@ -71,6 +71,7 @@ public: Rect(Interval const &a, Interval const &b) : Base(a,b) {} /** @brief Create a rectangle from two points. */ Rect(Point const &a, Point const &b) : Base(a,b) {} + Rect(Coord x0, Coord y0, Coord x1, Coord y1) : Base(x0, y0, x1, y1) {} Rect(Base const &b) : Base(b) {} /** @brief Create a rectangle from a range of points. * The resulting rectangle will contain all ponts from the range. @@ -89,6 +90,14 @@ public: Rect result = Rect::from_range(c, c+n); return result; } + static Rect from_xywh(Coord x, Coord y, Coord w, Coord h) { + Rect result = Base::from_xywh(x, y, w, h); + return result; + } + static Rect from_xywh(Point const &o, Point const &dim) { + Rect result = Base::from_xywh(o, dim); + return result; + } /// @} /// @name Inspect dimensions. |
