summaryrefslogtreecommitdiffstats
path: root/src/2geom/path.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/2geom/path.cpp')
-rw-r--r--src/2geom/path.cpp28
1 files changed, 2 insertions, 26 deletions
diff --git a/src/2geom/path.cpp b/src/2geom/path.cpp
index 0ff1f3b0c..8bfccf87a 100644
--- a/src/2geom/path.cpp
+++ b/src/2geom/path.cpp
@@ -245,22 +245,10 @@ Rect Path::boundsFast()
if (empty()) return bound;
bound = begin()->boundsFast();
- double top = bound.top();
- double bottom = bound.bottom();
- double left = bound.left();
- double right = bound.right();
for (iterator it = ++begin(); it != end(); ++it)
{
- bound = it->boundsFast();
- if ( top > bound.top() ) top = bound.top();
- if ( bottom < bound.bottom() ) bottom = bound.bottom();
- if ( left > bound.left() ) left = bound.left();
- if ( right < bound.right() ) right = bound.right();
+ bound.unionWith(it->boundsFast());
}
- bound[0][0] = left;
- bound[0][1] = right;
- bound[1][0] = top;
- bound[1][1] = bottom;
return bound;
}
@@ -270,22 +258,10 @@ Rect Path::boundsExact()
if (empty()) return bound;
bound = begin()->boundsExact();
- double top = bound.top();
- double bottom = bound.bottom();
- double left = bound.left();
- double right = bound.right();
for (iterator it = ++begin(); it != end(); ++it)
{
- bound = it->boundsExact();
- if ( top > bound.top() ) top = bound.top();
- if ( bottom < bound.bottom() ) bottom = bound.bottom();
- if ( left > bound.left() ) left = bound.left();
- if ( right < bound.right() ) right = bound.right();
+ bound.unionWith(it->boundsExact());
}
- bound[0][0] = left;
- bound[0][1] = right;
- bound[1][0] = top;
- bound[1][1] = bottom;
return bound;
}