diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2007-11-07 23:49:18 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2007-11-07 23:49:18 +0000 |
| commit | 4cb52b0db78ef33bc2b135798880f98d8f9b6b65 (patch) | |
| tree | 7f405ef69e76e452f0100c7647c51ecb460bf13b /src/2geom/piecewise.h | |
| parent | fix string size self-reference bug (diff) | |
| download | inkscape-4cb52b0db78ef33bc2b135798880f98d8f9b6b65.tar.gz inkscape-4cb52b0db78ef33bc2b135798880f98d8f9b6b65.zip | |
update 2geom
(bzr r4041)
Diffstat (limited to 'src/2geom/piecewise.h')
| -rw-r--r-- | src/2geom/piecewise.h | 14 |
1 files changed, 7 insertions, 7 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<typename T>
inline typename FragmentConcept<T>::BoundsType bounds_fast(const Piecewise<T> &f) {
boost::function_requires<FragmentConcept<T> >();
-
+
if(f.empty()) return typename FragmentConcept<T>::BoundsType();
typename FragmentConcept<T>::BoundsType ret(bounds_fast(f[0]));
for(unsigned i = 1; i < f.size(); i++)
@@ -227,7 +227,7 @@ inline typename FragmentConcept<T>::BoundsType bounds_fast(const Piecewise<T> &f template<typename T>
inline typename FragmentConcept<T>::BoundsType bounds_exact(const Piecewise<T> &f) {
boost::function_requires<FragmentConcept<T> >();
-
+
if(f.empty()) return typename FragmentConcept<T>::BoundsType();
typename FragmentConcept<T>::BoundsType ret(bounds_exact(f[0]));
for(unsigned i = 1; i < f.size(); i++)
@@ -238,20 +238,20 @@ inline typename FragmentConcept<T>::BoundsType bounds_exact(const Piecewise<T> & template<typename T>
inline typename FragmentConcept<T>::BoundsType bounds_local(const Piecewise<T> &f, const Interval &m) {
boost::function_requires<FragmentConcept<T> >();
-
+
if(f.empty()) return typename FragmentConcept<T>::BoundsType();
if(m.isEmpty()) return typename FragmentConcept<T>::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<T>::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;
}
|
