From c883d7627a479c8c5b6a9f77b9841fa5631572ad Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Mon, 27 Apr 2015 19:39:29 -0400 Subject: 2Geom sync - initial commit (bzr r14059.2.1) --- src/2geom/path-intersection.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/2geom/path-intersection.h') diff --git a/src/2geom/path-intersection.h b/src/2geom/path-intersection.h index 512c31167..e3a8d1de3 100644 --- a/src/2geom/path-intersection.h +++ b/src/2geom/path-intersection.h @@ -32,8 +32,8 @@ * */ -#ifndef __GEOM_PATH_INTERSECTION_H -#define __GEOM_PATH_INTERSECTION_H +#ifndef LIB2GEOM_SEEN_PATH_INTERSECTION_H +#define LIB2GEOM_SEEN_PATH_INTERSECTION_H #include <2geom/path.h> @@ -43,10 +43,10 @@ namespace Geom { -int winding(Path const &path, Point p); +int winding(Path const &path, Point const &p); bool path_direction(Path const &p); -inline bool contains(Path const & p, Point i, bool evenodd = true) { +inline bool contains(Path const & p, Point const &i, bool evenodd = true) { return (evenodd ? winding(p, i) % 2 : winding(p, i)) != 0; } @@ -74,19 +74,19 @@ Crossings mono_intersect(Curve const & A, Interval const &Ad, struct SimpleCrosser : public Crosser { Crossings crossings(Curve const &a, Curve const &b); Crossings crossings(Path const &a, Path const &b) { return curve_sweep(a, b); } - CrossingSet crossings(std::vector const &a, std::vector const &b) { return Crosser::crossings(a, b); } + CrossingSet crossings(PathVector const &a, PathVector const &b) { return Crosser::crossings(a, b); } }; struct MonoCrosser : public Crosser { - Crossings crossings(Path const &a, Path const &b) { return crossings(std::vector(1,a), std::vector(1,b))[0]; } - CrossingSet crossings(std::vector const &a, std::vector const &b); + Crossings crossings(Path const &a, Path const &b) { return crossings(PathVector(a), PathVector(b))[0]; } + CrossingSet crossings(PathVector const &a, PathVector const &b); }; typedef SimpleCrosser DefaultCrosser; std::vector path_mono_splits(Path const &p); -CrossingSet crossings_among(std::vector const & p); +CrossingSet crossings_among(PathVector const & p); Crossings self_crossings(Path const & a); inline Crossings crossings(Curve const & a, Curve const & b) { @@ -99,7 +99,7 @@ inline Crossings crossings(Path const & a, Path const & b) { return c.crossings(a, b); } -inline CrossingSet crossings(std::vector const & a, std::vector const & b) { +inline CrossingSet crossings(PathVector const & a, PathVector const & b) { DefaultCrosser c = DefaultCrosser(); return c.crossings(a, b); } -- cgit v1.2.3 From 25fa09178b7d0d0befa708e93ea5316ef381caa0 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Fri, 22 May 2015 10:23:27 +0200 Subject: Update to 2Geom revision 2396 (bzr r14059.2.16) --- src/2geom/path-intersection.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/2geom/path-intersection.h') diff --git a/src/2geom/path-intersection.h b/src/2geom/path-intersection.h index e3a8d1de3..f06eeaf94 100644 --- a/src/2geom/path-intersection.h +++ b/src/2geom/path-intersection.h @@ -35,11 +35,9 @@ #ifndef LIB2GEOM_SEEN_PATH_INTERSECTION_H #define LIB2GEOM_SEEN_PATH_INTERSECTION_H -#include <2geom/path.h> - #include <2geom/crossing.h> - -#include <2geom/sweep.h> +#include <2geom/path.h> +#include <2geom/sweep-bounds.h> namespace Geom { -- cgit v1.2.3