diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2011-08-27 09:04:37 +0000 |
|---|---|---|
| committer | Krzysztof Kosinski <tweenk.pl@gmail.com> | 2011-08-27 09:04:37 +0000 |
| commit | 72cc39b9f0b340548f395c7f61ca9662b34aea09 (patch) | |
| tree | 34a0853cff6c6040bc2a0572dfa365280fce2601 /src/extension/internal/odf.cpp | |
| parent | Fix "snap guides" toggle (diff) | |
| download | inkscape-72cc39b9f0b340548f395c7f61ca9662b34aea09.tar.gz inkscape-72cc39b9f0b340548f395c7f61ca9662b34aea09.zip | |
Refactor SPItem bounding box methods: remove NRRect usage and make code
using them more obvious. Fix filter region computation.
(bzr r10582.1.1)
Diffstat (limited to 'src/extension/internal/odf.cpp')
| -rw-r--r-- | src/extension/internal/odf.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/extension/internal/odf.cpp b/src/extension/internal/odf.cpp index 568c804a0..735c57798 100644 --- a/src/extension/internal/odf.cpp +++ b/src/extension/internal/odf.cpp @@ -573,7 +573,7 @@ void SingularValueDecomposition::calculate() //double eps = pow(2.0,-52.0); //double tiny = pow(2.0,-966.0); //let's just calculate these now - //a double can be e ± 308.25, so this is safe + //a double can be e ± 308.25, so this is safe double eps = 2.22e-16; double tiny = 1.6e-291; while (p > 0) { @@ -965,15 +965,10 @@ static Geom::Affine getODFTransform(const SPItem *item) */ static Geom::OptRect getODFBoundingBox(const SPItem *item) { - Geom::OptRect bbox_temp = ((SPItem *)item)->getBboxDesktop(); - Geom::OptRect bbox; - if (bbox_temp) { - bbox = *bbox_temp; - double doc_height = SP_ACTIVE_DOCUMENT->getHeight(); - Geom::Affine doc2dt_tf = Geom::Affine(Geom::Scale(1.0, -1.0)); - doc2dt_tf = doc2dt_tf * Geom::Affine(Geom::Translate(0, doc_height)); - bbox = *bbox * doc2dt_tf; - bbox = *bbox * Geom::Affine(Geom::Scale(pxToCm)); + // TODO: geometric or visual? + Geom::OptRect bbox = ((SPItem *)item)->documentVisualBounds(); + if (bbox) { + *bbox *= Geom::Affine(Geom::Scale(pxToCm)); } return bbox; } |
