From 328fad57dbfb65e3bd31062021d5cc3081e68515 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Fri, 22 Jul 2011 04:09:27 +0200 Subject: Replace direct use of Cairo contexts and surfaces in the rendering tree with wrappers which keep some extra information about the surface, amd NRRect and NRRectL use with Geom::Rect and Geom::IntRect. Should simplify implementing filter primitive subregions. (bzr r10347.1.17) --- src/trace/trace.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/trace/trace.cpp') diff --git a/src/trace/trace.cpp b/src/trace/trace.cpp index 813f532a4..ef75d8b23 100644 --- a/src/trace/trace.cpp +++ b/src/trace/trace.cpp @@ -251,11 +251,11 @@ Tracer::sioxProcessImage(SPImage *img, //g_message("img: %d %d %d %d\n", aImg->bbox.x0, aImg->bbox.y0, // aImg->bbox.x1, aImg->bbox.y1); - double width = (double)(aImg->bbox.x1 - aImg->bbox.x0); - double height = (double)(aImg->bbox.y1 - aImg->bbox.y0); + double width = aImg->bbox->width(); + double height = aImg->bbox->height(); - double iwidth = (double)simage.getWidth(); - double iheight = (double)simage.getHeight(); + double iwidth = simage.getWidth(); + double iheight = simage.getHeight(); double iwscale = width / iwidth; double ihscale = height / iheight; @@ -278,11 +278,11 @@ Tracer::sioxProcessImage(SPImage *img, for (int row=0 ; rowbbox.y0) + ihscale * (double) row; + double ypos = aImg->bbox->top() + ihscale * (double) row; for (int col=0 ; colbbox.x0) + iwscale * (double)col; + double xpos = aImg->bbox->left() + iwscale * (double)col; Geom::Point point(xpos, ypos); if (aImg->transform) point *= *aImg->transform; -- cgit v1.2.3