diff --git a/src/trace/trace.cpp b/src/trace/trace.cpp
index 5833db4fd7b1a55db98152d9cab183ef285c97af..95c144e28b18b831023685a779ee699601fb8c18 100644 (file)
--- a/src/trace/trace.cpp
+++ b/src/trace/trace.cpp
#include <sp-item.h>
#include <sp-shape.h>
#include <sp-image.h>
+#include <libnr/nr-matrix-ops.h>
+#include <libnr/nr-scale-translate-ops.h>
#include <display/nr-arena.h>
#include <display/nr-arena-shape.h>
//Get absolute X,Y position
double xpos = ((double)aImg->bbox.x0) + iwscale * (double)col;
NR::Point point(xpos, ypos);
- point *= aImg->transform;
+ point *= *aImg->transform;
//point *= imgMat;
//point = desktop->doc2dt(point);
//g_message("x:%f y:%f\n", point[0], point[1]);
if (sp_repr_get_double(imgRepr, "height", &dval))
height = dval;
- NR::Matrix trans(NR::translate(x, y));
-
double iwidth = (double)pixbuf->get_width();
double iheight = (double)pixbuf->get_height();
double iwscale = width / iwidth;
double ihscale = height / iheight;
- NR::Matrix scal(NR::scale(iwscale, ihscale));
+ NR::translate trans(x, y);
+ NR::scale scal(iwscale, ihscale);
//# Convolve scale, translation, and the original transform
- NR::Matrix tf(scal);
- tf *= trans;
+ NR::Matrix tf(scal * trans);
tf *= img->transform;