diff options
Diffstat (limited to 'src/2geom/geom.cpp')
| -rw-r--r-- | src/2geom/geom.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/2geom/geom.cpp b/src/2geom/geom.cpp index d0689981a..f9b1a664b 100644 --- a/src/2geom/geom.cpp +++ b/src/2geom/geom.cpp @@ -9,6 +9,7 @@ #include <2geom/geom.h> #include <2geom/point.h> #include <algorithm> +#include <2geom/rect.h> namespace Geom { @@ -313,6 +314,14 @@ rect_line_intersect(Geom::Point const &c0, Geom::Point const &c1, return results; } +std::vector<Geom::Point> +rect_line_intersect(Geom::Rect &r, + Geom::Point const &p0, Geom::Point const &p1) +{ + return rect_line_intersect(r.min(), r.max(), p0, p1); +} + + /** * polyCentroid: Calculates the centroid (xCentroid, yCentroid) and area of a polygon, given its * vertices (x[0], y[0]) ... (x[n-1], y[n-1]). It is assumed that the contour is closed, i.e., that |
