Well, i seem to have fixed this. Please update.<br><br>There are some crashes when you paint on the mask, i'm investigating this.<br><br><br>A couple of comments about the pacth:<br>1) There is no need to make a copy of a source device as convolution will do this for you one more time. I mean first line should be:<br>
KisPaintDeviceSP interm = new KisPaintDevice(src->colorSpace());<br><br>2) Shared pointers shouldn't be delete'ed. This may cause a crash =)<br><br clear="all">Final working version of the 'if':<br><br>
if ( (horizontalRadius > 0) && (verticalRadius > 0) )<br> {<br> KisPaintDeviceSP interm = new KisPaintDevice(src->colorSpace());<br><br> KisConvolutionKernelSP kernelHoriz = KisConvolutionKernel::fromMatrix(horizGaussian, 0, horizGaussian.sum());<br>
KisConvolutionKernelSP kernelVertical = KisConvolutionKernel::fromMatrix(verticalGaussian, 0, verticalGaussian.sum());<br><br> KisConvolutionPainter horizPainter(interm, dstInfo.selection());<br> horizPainter.applyMatrix(kernelHoriz, src, srcTopLeft, srcTopLeft, size, BORDER_REPEAT);<br>
<br> KisConvolutionPainter verticalPainter(dst, dstInfo.selection());<br> verticalPainter.applyMatrix(kernelVertical, interm, srcTopLeft, dstTopLeft, size, BORDER_REPEAT);<br><br> }<br><br><br>-- <br>Dmitry Kazakov<br>