From a612be74de962213420afa66cf575e433159629b Mon Sep 17 00:00:00 2001 From: johanengelen Date: Thu, 1 Jan 2009 23:40:56 +0000 Subject: [PATCH] switch nr-filter to 2geom --- src/display/nr-filter-units.cpp | 6 ------ src/display/nr-filter.cpp | 5 ++--- src/display/pixblock-transform.cpp | 10 +++++----- src/display/pixblock-transform.h | 6 +++--- 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/src/display/nr-filter-units.cpp b/src/display/nr-filter-units.cpp index c26d56ad6..eafe1423f 100644 --- a/src/display/nr-filter-units.cpp +++ b/src/display/nr-filter-units.cpp @@ -12,13 +12,7 @@ #include #include "display/nr-filter-units.h" -#include "libnr/nr-matrix.h" -#include "libnr/nr-matrix-fns.h" -#include "libnr/nr-matrix-ops.h" -#include "libnr/nr-matrix-scale-ops.h" -#include "libnr/nr-rect.h" #include "libnr/nr-rect-l.h" -#include "libnr/nr-scale.h" #include "sp-filter-units.h" #include <2geom/transforms.h> diff --git a/src/display/nr-filter.cpp b/src/display/nr-filter.cpp index 36ba3704e..a6c5df036 100644 --- a/src/display/nr-filter.cpp +++ b/src/display/nr-filter.cpp @@ -42,9 +42,8 @@ #include "display/nr-arena-item.h" #include "libnr/nr-pixblock.h" #include "libnr/nr-blit.h" -#include "libnr/nr-matrix.h" -#include "libnr/nr-scale.h" -#include "2geom/rect.h" +#include <2geom/matrix.h> +#include <2geom/rect.h> #include "svg/svg-length.h" #include "sp-filter-units.h" #include "preferences.h" diff --git a/src/display/pixblock-transform.cpp b/src/display/pixblock-transform.cpp index 74ded2ae0..daf27582a 100644 --- a/src/display/pixblock-transform.cpp +++ b/src/display/pixblock-transform.cpp @@ -23,7 +23,7 @@ using std::floor; #include "libnr/nr-blit.h" #include "libnr/nr-pixblock.h" -#include "libnr/nr-matrix.h" +#include <2geom/matrix.h> namespace NR { @@ -45,7 +45,7 @@ inline void _check_index(NRPixBlock const * const pb, int const location, int co } } -void transform_nearest(NRPixBlock *to, NRPixBlock *from, Matrix &trans) +void transform_nearest(NRPixBlock *to, NRPixBlock *from, Geom::Matrix const &trans) { if (NR_PIXBLOCK_BPP(from) != 4 || NR_PIXBLOCK_BPP(to) != 4) { g_warning("A non-32-bpp image passed to transform_nearest: scaling aborted."); @@ -67,7 +67,7 @@ void transform_nearest(NRPixBlock *to, NRPixBlock *from, Matrix &trans) int to_width = to->area.x1 - to->area.x0; int to_height = to->area.y1 - to->area.y0; - Matrix itrans = trans.inverse(); + Geom::Matrix itrans = trans.inverse(); // Loop through every pixel of destination image, a line at a time for (int to_y = 0 ; to_y < to_height ; to_y++) { @@ -155,7 +155,7 @@ inline static int samplex(const int a, const int b, const int c, const int d, co return sum / 256; } -void transform_bicubic(NRPixBlock *to, NRPixBlock *from, Matrix &trans) +void transform_bicubic(NRPixBlock *to, NRPixBlock *from, Geom::Matrix const &trans) { if (NR_PIXBLOCK_BPP(from) != 4 || NR_PIXBLOCK_BPP(to) != 4) { g_warning("A non-32-bpp image passed to transform_bicubic: scaling aborted."); @@ -177,7 +177,7 @@ void transform_bicubic(NRPixBlock *to, NRPixBlock *from, Matrix &trans) int to_width = to->area.x1 - to->area.x0; int to_height = to->area.y1 - to->area.y0; - Matrix itrans = trans.inverse(); + Geom::Matrix itrans = trans.inverse(); // Loop through every pixel of destination image, a line at a time for (int to_y = 0 ; to_y < to_height ; to_y++) { diff --git a/src/display/pixblock-transform.h b/src/display/pixblock-transform.h index fd28567af..3ba00a08f 100644 --- a/src/display/pixblock-transform.h +++ b/src/display/pixblock-transform.h @@ -13,12 +13,12 @@ */ #include "libnr/nr-pixblock.h" -#include "libnr/nr-matrix.h" +#include <2geom/forward.h> namespace NR { -void transform_nearest(NRPixBlock *to, NRPixBlock *from, Matrix &trans); -void transform_bicubic(NRPixBlock *to, NRPixBlock *from, Matrix &trans); +void transform_nearest(NRPixBlock *to, NRPixBlock *from, Geom::Matrix const &trans); +void transform_bicubic(NRPixBlock *to, NRPixBlock *from, Geom::Matrix const &trans); } /* namespace NR */ -- 2.30.2