summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2009-01-01 23:40:56 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2009-01-01 23:40:56 +0000
commita37a3e7c3940355e2539c4b66e742d1ba32eb30d (patch)
tree40eea0ddf05d845dda898e05845aee50ade919d7 /src
parentremove old icon code that seems unused (diff)
downloadinkscape-a37a3e7c3940355e2539c4b66e742d1ba32eb30d.tar.gz
inkscape-a37a3e7c3940355e2539c4b66e742d1ba32eb30d.zip
switch nr-filter to 2geom
(bzr r7055)
Diffstat (limited to 'src')
-rw-r--r--src/display/nr-filter-units.cpp6
-rw-r--r--src/display/nr-filter.cpp5
-rw-r--r--src/display/pixblock-transform.cpp10
-rw-r--r--src/display/pixblock-transform.h6
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 <glib.h>
#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 */