summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1391bb9)
raw | patch | inline | side by side (parent: 1391bb9)
author | jucablues <jucablues@users.sourceforge.net> | |
Fri, 17 Aug 2007 11:13:43 +0000 (11:13 +0000) | ||
committer | jucablues <jucablues@users.sourceforge.net> | |
Fri, 17 Aug 2007 11:13:43 +0000 (11:13 +0000) |
src/display/nr-filter-turbulence.cpp | patch | blob | history |
index 8796090091f5fefe571b921751744ab03d7299e6..d0921047af972f7cf0bf4f8056af00640c9b63e8 100644 (file)
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;