diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2011-07-22 02:09:27 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2011-07-22 02:09:27 +0000 |
| commit | 328fad57dbfb65e3bd31062021d5cc3081e68515 (patch) | |
| tree | 55b02cfb325a87d994fefb0e4ea88311812e9444 /src/trace/trace.cpp | |
| parent | Clean up some commented-out code (diff) | |
| download | inkscape-328fad57dbfb65e3bd31062021d5cc3081e68515.tar.gz inkscape-328fad57dbfb65e3bd31062021d5cc3081e68515.zip | |
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)
Diffstat (limited to 'src/trace/trace.cpp')
| -rw-r--r-- | src/trace/trace.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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 ; row<iheight ; row++) { - double ypos = ((double)aImg->bbox.y0) + ihscale * (double) row; + double ypos = aImg->bbox->top() + ihscale * (double) row; for (int col=0 ; col<simage.getWidth() ; col++) { //Get absolute X,Y position - double xpos = ((double)aImg->bbox.x0) + iwscale * (double)col; + double xpos = aImg->bbox->left() + iwscale * (double)col; Geom::Point point(xpos, ypos); if (aImg->transform) point *= *aImg->transform; |
