From 8e9ea25ef0d0f668ad77dae037269f19ba99143b Mon Sep 17 00:00:00 2001 From: johanengelen Date: Wed, 7 Nov 2007 23:49:18 +0000 Subject: [PATCH] update 2geom --- src/2geom/piecewise.h | 14 +++++++------- src/2geom/rect.h | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/2geom/piecewise.h b/src/2geom/piecewise.h index 396811050..b4f000dc4 100644 --- a/src/2geom/piecewise.h +++ b/src/2geom/piecewise.h @@ -216,7 +216,7 @@ class Piecewise { template inline typename FragmentConcept::BoundsType bounds_fast(const Piecewise &f) { boost::function_requires >(); - + if(f.empty()) return typename FragmentConcept::BoundsType(); typename FragmentConcept::BoundsType ret(bounds_fast(f[0])); for(unsigned i = 1; i < f.size(); i++) @@ -227,7 +227,7 @@ inline typename FragmentConcept::BoundsType bounds_fast(const Piecewise &f template inline typename FragmentConcept::BoundsType bounds_exact(const Piecewise &f) { boost::function_requires >(); - + if(f.empty()) return typename FragmentConcept::BoundsType(); typename FragmentConcept::BoundsType ret(bounds_exact(f[0])); for(unsigned i = 1; i < f.size(); i++) @@ -238,20 +238,20 @@ inline typename FragmentConcept::BoundsType bounds_exact(const Piecewise & template inline typename FragmentConcept::BoundsType bounds_local(const Piecewise &f, const Interval &m) { boost::function_requires >(); - + if(f.empty()) return typename FragmentConcept::BoundsType(); if(m.isEmpty()) return typename FragmentConcept::BoundsType(f(m.min())); - + unsigned fi = f.segN(m.min()), ti = f.segN(m.max()); double ft = f.segT(m.min(), fi), tt = f.segT(m.max(), ti); - + if(fi == ti) return bounds_local(f[fi], Interval(ft, tt)); - + typename FragmentConcept::BoundsType ret(bounds_local(f[fi], Interval(ft, 1.))); for(unsigned i = fi + 1; i < ti; i++) ret.unionWith(bounds_exact(f[i])); if(tt != 0.) ret.unionWith(bounds_local(f[ti], Interval(0., tt))); - + return ret; } diff --git a/src/2geom/rect.h b/src/2geom/rect.h index 6a6d979a4..86f9ec140 100644 --- a/src/2geom/rect.h +++ b/src/2geom/rect.h @@ -54,9 +54,9 @@ template<> class D2 { private: Interval f[2]; - D2();// { f[X] = f[Y] = Interval(0, 0); } - public: + D2() { f[X] = f[Y] = Interval(0, 0); } + D2(Interval const &a, Interval const &b) { f[X] = a; f[Y] = b; -- 2.30.2