From: kiirala Date: Mon, 23 Jul 2007 19:09:12 +0000 (+0000) Subject: Patch by Felipe Sanches: fixed transparent lines in feConvolveMatrix output X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cf1bc84463faaecbbca1f329e822175c0e4adfeb;p=inkscape.git Patch by Felipe Sanches: fixed transparent lines in feConvolveMatrix output --- diff --git a/src/display/nr-filter-convolve-matrix.cpp b/src/display/nr-filter-convolve-matrix.cpp index 6bdb3306e..75a40df70 100644 --- a/src/display/nr-filter-convolve-matrix.cpp +++ b/src/display/nr-filter-convolve-matrix.cpp @@ -57,8 +57,8 @@ int FilterConvolveMatrix::render(FilterSlot &slot, Matrix const &trans) { } } - for (x=0; x < width; x++){ - for (y=0; y < height; y++){ + for (x=targetX; x < width - (orderX - targetX); x++){ + for (y=targetY; y < height - (orderY - targetY); y++){ result_R = 0; result_G = 0; result_B = 0; @@ -125,6 +125,12 @@ void FilterConvolveMatrix::set_kernelMatrix(std::vector &km) { void FilterConvolveMatrix::area_enlarge(NRRectL &area, Matrix const &trans) { + //Seems to me that since this filter's operation is resolution dependent, + // some spurious pixels may still appear at the borders when low zooming or rotating. Needs a better fix. + area.x0 -= targetX; + area.y0 -= targetY; + area.x1 += orderX - targetX; + area.y1 += orderY - targetY; } } /* namespace NR */