diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-06-23 22:57:47 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-06-23 22:57:47 +0000 |
| commit | b3ec68bfff2ccf1eb4c7a43cba7452c2b4cdcd20 (patch) | |
| tree | 68d328adc60e87d10e7a4bc4e06528f6eae68406 /src/helper/geom.cpp | |
| parent | use exact bbox again in updating shapes (diff) | |
| download | inkscape-b3ec68bfff2ccf1eb4c7a43cba7452c2b4cdcd20.tar.gz inkscape-b3ec68bfff2ccf1eb4c7a43cba7452c2b4cdcd20.zip | |
speed up bounds_exact for 2geom even more.
(bzr r6035)
Diffstat (limited to 'src/helper/geom.cpp')
| -rw-r--r-- | src/helper/geom.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/helper/geom.cpp b/src/helper/geom.cpp index 9fe823670..a056b2851 100644 --- a/src/helper/geom.cpp +++ b/src/helper/geom.cpp @@ -17,6 +17,7 @@ #include <2geom/transforms.h>
#include <2geom/rect.h>
#include <2geom/coord.h>
+#include <glibmm.h>
/* Fast bbox calculation */
/* Thanks to Nathan Hurst for suggesting it */
@@ -138,9 +139,8 @@ bounds_exact_transformed(Geom::PathVector const & pv, Geom::Matrix const & t) if (pv.empty())
return bbox;
- Geom::Curve *temp = pv.front().front().transformed(t);
- bbox = temp->boundsExact(); // need decent starting bbox. could be improved by using large numbers for initial bbox (interval(huge,-huge))
- delete temp;
+ Geom::Point initial = pv.front().initialPoint() * t;
+ bbox = Geom::Rect(initial, initial); // obtain well defined bbox as starting point to unionWith
for (Geom::PathVector::const_iterator it = pv.begin(); it != pv.end(); ++it) {
bbox.expandTo(it->initialPoint() * t);
|
