summaryrefslogtreecommitdiffstats
path: root/src/display/nr-arena-image.cpp
diff options
context:
space:
mode:
authorJasper van de Gronde <jasper.vandegronde@gmail.com>2010-04-18 14:17:05 +0000
committerJasper van de Gronde <jasper.vandegronde@gmail.com>2010-04-18 14:17:05 +0000
commit754b97f48cd23a2a178a121917a3e58a609fc3c2 (patch)
treea4ce2145606a599b0a31d845752867f892f57df5 /src/display/nr-arena-image.cpp
parentCorrect #endif placement. Should fix win32 build. (diff)
downloadinkscape-754b97f48cd23a2a178a121917a3e58a609fc3c2.tar.gz
inkscape-754b97f48cd23a2a178a121917a3e58a609fc3c2.zip
Fix for bug #455302 and bug #165529, also partially fixes bounding box of various NR Arena Items as passed to filters (it used to explicitly make the bounding box larger) and makes nr-filter-displacement-map use rowstride
(bzr r9350)
Diffstat (limited to 'src/display/nr-arena-image.cpp')
-rw-r--r--src/display/nr-arena-image.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/display/nr-arena-image.cpp b/src/display/nr-arena-image.cpp
index f45a2da4f..493943168 100644
--- a/src/display/nr-arena-image.cpp
+++ b/src/display/nr-arena-image.cpp
@@ -151,10 +151,10 @@ nr_arena_image_update( NRArenaItem *item, NRRectL */*area*/, NRGC *gc, unsigned
nr_rect_d_matrix_transform (&bbox, &bbox, gc->transform);
- item->bbox.x0 = (int) floor (bbox.x0);
- item->bbox.y0 = (int) floor (bbox.y0);
- item->bbox.x1 = (int) ceil (bbox.x1);
- item->bbox.y1 = (int) ceil (bbox.y1);
+ item->bbox.x0 = static_cast<NR::ICoord>(floor(bbox.x0)); // Floor gives the coordinate in which the point resides
+ item->bbox.y0 = static_cast<NR::ICoord>(floor(bbox.y0));
+ item->bbox.x1 = static_cast<NR::ICoord>(ceil (bbox.x1)); // Ceil gives the first coordinate beyond the point
+ item->bbox.y1 = static_cast<NR::ICoord>(ceil (bbox.y1));
} else {
item->bbox.x0 = (int) gc->transform[4];
item->bbox.y0 = (int) gc->transform[5];
@@ -211,13 +211,7 @@ nr_arena_image_render( cairo_t *ct, NRArenaItem *item, NRRectL */*area*/, NRPixB
} else if (pb->mode == NR_PIXBLOCK_MODE_R8G8B8A8P) {
nr_R8G8B8A8_P_R8G8B8A8_P_R8G8B8A8_N_TRANSFORM (dpx, dw, dh, drs, spx, sw, sh, srs, d2s, Falpha, nr_arena_image_x_sample, nr_arena_image_y_sample);
} else if (pb->mode == NR_PIXBLOCK_MODE_R8G8B8A8N) {
-
- //FIXME: The _N_N_N_ version gives a gray border around images, see bug 906376
- // This mode is only used when exporting, screen rendering always has _P_P_P_, so I decided to simply replace it for now
- // Feel free to propose a better fix
-
- //nr_R8G8B8A8_N_R8G8B8A8_N_R8G8B8A8_N_TRANSFORM (dpx, dw, dh, drs, spx, sw, sh, srs, d2s, Falpha, nr_arena_image_x_sample, nr_arena_image_y_sample);
- nr_R8G8B8A8_P_R8G8B8A8_P_R8G8B8A8_N_TRANSFORM (dpx, dw, dh, drs, spx, sw, sh, srs, d2s, Falpha, nr_arena_image_x_sample, nr_arena_image_y_sample);
+ nr_R8G8B8A8_N_R8G8B8A8_N_R8G8B8A8_N_TRANSFORM (dpx, dw, dh, drs, spx, sw, sh, srs, d2s, Falpha, nr_arena_image_x_sample, nr_arena_image_y_sample);
}
pb->empty = FALSE;