diff options
| author | Felipe Corr??a da Silva Sanches <juca@members.fsf.org> | 2007-08-17 11:13:43 +0000 |
|---|---|---|
| committer | jucablues <jucablues@users.sourceforge.net> | 2007-08-17 11:13:43 +0000 |
| commit | 439b295aa270e550dbabad8bea476d70aac5b63f (patch) | |
| tree | a80b21f378e35c53513a1510d94e88b74152c41a /src | |
| parent | * Better labels and icons for OCAL import/export (diff) | |
| download | inkscape-439b295aa270e550dbabad8bea476d70aac5b63f.tar.gz inkscape-439b295aa270e550dbabad8bea476d70aac5b63f.zip | |
fixed pix_data buffer width on feTurbulence
(bzr r3490)
Diffstat (limited to 'src')
| -rw-r--r-- | src/display/nr-filter-turbulence.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/display/nr-filter-turbulence.cpp b/src/display/nr-filter-turbulence.cpp index 879609009..d0921047a 100644 --- a/src/display/nr-filter-turbulence.cpp +++ b/src/display/nr-filter-turbulence.cpp @@ -120,14 +120,16 @@ int FilterTurbulence::render(FilterSlot &slot, Matrix const &trans) { int bbox_x0 = (int) slot.get_arenaitem()->bbox.x0; int bbox_y0 = (int) slot.get_arenaitem()->bbox.y0; - + int bbox_x1 = (int) slot.get_arenaitem()->bbox.x1; + int bbox_w = bbox_x1 - bbox_x0; + unsigned char *out_data = NR_PIXBLOCK_PX(out); for (x=x0; x < x1; x++){ for (y=y0; y < y1; y++){ - out_data[4*((x - x0)+w*(y - y0))] = pix_data[4*(x - bbox_x0 + w*(y - bbox_y0)) ]; - out_data[4*((x - x0)+w*(y - y0)) + 1] = pix_data[4*(x - bbox_x0 + w*(y - bbox_y0))+1]; - out_data[4*((x - x0)+w*(y - y0)) + 2] = pix_data[4*(x - bbox_x0 + w*(y - bbox_y0))+2]; - out_data[4*((x - x0)+w*(y - y0)) + 3] = pix_data[4*(x - bbox_x0 + w*(y - bbox_y0))+3]; + out_data[4*((x - x0)+w*(y - y0))] = pix_data[4*(x - bbox_x0 + bbox_w*(y - bbox_y0)) ]; + out_data[4*((x - x0)+w*(y - y0)) + 1] = pix_data[4*(x - bbox_x0 + bbox_w*(y - bbox_y0))+1]; + out_data[4*((x - x0)+w*(y - y0)) + 2] = pix_data[4*(x - bbox_x0 + bbox_w*(y - bbox_y0))+2]; + out_data[4*((x - x0)+w*(y - y0)) + 3] = pix_data[4*(x - bbox_x0 + bbox_w*(y - bbox_y0))+3]; } } out->empty = FALSE; |
