diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2011-07-14 19:42:57 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2011-07-14 19:42:57 +0000 |
| commit | efbf9755460d4c4b7a3d9d43dd753afcc8a28865 (patch) | |
| tree | 41a259211da187e29f9983821b4cdfea221b6ad6 /src/helper | |
| parent | Fix crashes in print preview (diff) | |
| parent | Make cms_key in SPDesktopWidget a regular ustring rather than a pointer (diff) | |
| download | inkscape-efbf9755460d4c4b7a3d9d43dd753afcc8a28865.tar.gz inkscape-efbf9755460d4c4b7a3d9d43dd753afcc8a28865.zip | |
Merge SPCanvasArena caching layer work
(bzr r10451)
Diffstat (limited to 'src/helper')
| -rw-r--r-- | src/helper/geom.cpp | 10 | ||||
| -rw-r--r-- | src/helper/geom.h | 4 | ||||
| -rw-r--r-- | src/helper/pixbuf-ops.cpp | 1 | ||||
| -rw-r--r-- | src/helper/png-write.cpp | 1 | ||||
| -rw-r--r-- | src/helper/recthull.h | 2 |
5 files changed, 10 insertions, 8 deletions
diff --git a/src/helper/geom.cpp b/src/helper/geom.cpp index 64aa8bc48..fdfbdb9d3 100644 --- a/src/helper/geom.cpp +++ b/src/helper/geom.cpp @@ -511,15 +511,15 @@ namespace Geom { bool transform_equalp(Geom::Affine const &m0, Geom::Affine const &m1, Geom::Coord const epsilon) { return - NR_DF_TEST_CLOSE(m0[0], m1[0], epsilon) && - NR_DF_TEST_CLOSE(m0[1], m1[1], epsilon) && - NR_DF_TEST_CLOSE(m0[2], m1[2], epsilon) && - NR_DF_TEST_CLOSE(m0[3], m1[3], epsilon); + Geom::are_near(m0[0], m1[0], epsilon) && + Geom::are_near(m0[1], m1[1], epsilon) && + Geom::are_near(m0[2], m1[2], epsilon) && + Geom::are_near(m0[3], m1[3], epsilon); } bool translate_equalp(Geom::Affine const &m0, Geom::Affine const &m1, Geom::Coord const epsilon) { - return NR_DF_TEST_CLOSE(m0[4], m1[4], epsilon) && NR_DF_TEST_CLOSE(m0[5], m1[5], epsilon); + return Geom::are_near(m0[4], m1[4], epsilon) && Geom::are_near(m0[5], m1[5], epsilon); } diff --git a/src/helper/geom.h b/src/helper/geom.h index b1015b185..630d67aba 100644 --- a/src/helper/geom.h +++ b/src/helper/geom.h @@ -13,8 +13,8 @@ */ #include <2geom/forward.h> -#include <libnr/nr-forward.h> -#include <libnr/nr-coord.h> +#include <2geom/rect.h> +#include <2geom/affine.h> Geom::OptRect bounds_fast_transformed(Geom::PathVector const & pv, Geom::Affine const & t); Geom::OptRect bounds_exact_transformed(Geom::PathVector const & pv, Geom::Affine const & t); diff --git a/src/helper/pixbuf-ops.cpp b/src/helper/pixbuf-ops.cpp index 9ebbe13c7..e1ced31b4 100644 --- a/src/helper/pixbuf-ops.cpp +++ b/src/helper/pixbuf-ops.cpp @@ -18,6 +18,7 @@ #include <glib.h> #include <glib/gmessages.h> #include <png.h> +#include <2geom/transforms.h> #include "interface.h" #include "helper/png-write.h" diff --git a/src/helper/png-write.cpp b/src/helper/png-write.cpp index 4667f631b..5a20ac363 100644 --- a/src/helper/png-write.cpp +++ b/src/helper/png-write.cpp @@ -18,6 +18,7 @@ #include "interface.h" #include <2geom/rect.h> +#include <2geom/transforms.h> #include <glib/gmessages.h> #include <png.h> #include "png-write.h" diff --git a/src/helper/recthull.h b/src/helper/recthull.h index a9cad4466..d82450ce8 100644 --- a/src/helper/recthull.h +++ b/src/helper/recthull.h @@ -38,7 +38,7 @@ public: void add(Rect const &r) { // Note that this is a hack. when convexhull actually works // you will need to add all four points. - _bounds = unify(_bounds, r); + _bounds.unionWith(r); } void add(RectHull const &h) { if (h._bounds) { |
