deweese 2002/06/28 03:35:18 Modified: sources/org/apache/batik/ext/awt/image/rendered GaussianBlurRed8Bit.java Added: samples/tests/spec/filters feGaussianDefault.svg Log: Fix for Bug 9744 - Unable to convolve src image Revision Changes Path 1.1 xml-batik/samples/tests/spec/filters/feGaussianDefault.svg Index: feGaussianDefault.svg =================================================================== <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> <!-- ====================================================================== --> <!-- Copyright (C) The Apache Software Foundation. All rights reserved. --> <!-- --> <!-- This software is published under the terms of the Apache Software --> <!-- License version 1.1, a copy of which has been included with this --> <!-- distribution in the LICENSE file. --> <!-- ====================================================================== --> <!-- ====================================================================== --> <!-- check updates on gradients, filter, mask, and clip regarding to --> <!-- geometry updates --> <!-- --> <!-- @author [EMAIL PROTECTED] --> <!-- @version $Id: feGaussianDefault.svg,v 1.1 2002/06/28 10:35:17 deweese Exp $ --> <!-- ====================================================================== --> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="body" width="450" height="500" viewBox="0 0 450 500"> <defs> <filter id="filterObjectBoundingBox" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1"> <feGaussianBlur/> </filter> </defs> <g id="test-content"> <rect onclick="move(evt)" x="50" y="110" width="90" height="85" style="fill:crimson; filter:url(#filterObjectBoundingBox)"/> </g> </svg> 1.4 +10 -8 xml-batik/sources/org/apache/batik/ext/awt/image/rendered/GaussianBlurRed8Bit.java Index: GaussianBlurRed8Bit.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/ext/awt/image/rendered/GaussianBlurRed8Bit.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- GaussianBlurRed8Bit.java 9 Nov 2001 22:53:44 -0000 1.3 +++ GaussianBlurRed8Bit.java 28 Jun 2002 10:35:17 -0000 1.4 @@ -105,13 +105,12 @@ (hints.get(hints.KEY_RENDERING))); // System.out.println("StdDev: " + stdDevX + "x" + stdDevY); - - if ((stdDevX < 2) || highQuality) + if ((xinset != 0) && ((stdDevX < 2) || highQuality)) convOp[0] = new ConvolveOp(makeQualityKernelX(xinset*2+1)); else dX = (int)Math.floor(DSQRT2PI*stdDevX+0.5f); - if ((stdDevY < 2) || highQuality) + if ((yinset != 0) && ((stdDevY < 2) || highQuality)) convOp[1] = new ConvolveOp(makeQualityKernelY(yinset*2+1)); else dY = (int)Math.floor(DSQRT2PI*stdDevY+0.5f); @@ -144,7 +143,7 @@ * Calculate the number of surround pixels required for a given * standard Deviation. Also takes into account rendering quality * hint. - */ + */ public static int surroundPixels(double stdDev, RenderingHints hints) { boolean highQuality = ((hints != null) && hints.VALUE_RENDER_QUALITY.equals @@ -239,8 +238,9 @@ // doesn't bother to convolve the top and bottom edges int skipX; // long t1 = System.currentTimeMillis(); - - if (convOp[0] != null) { + if (xinset == 0) { + skipX = 0; + } else if (convOp[0] != null) { tmpR2 = getColorModel().createCompatibleWritableRaster (r.width, r.height); tmpR2 = convOp[0].filter(tmpR1, tmpR2); @@ -264,7 +264,9 @@ } } - if (convOp[1] != null) { + if (yinset == 0) { + tmpR2 = tmpR1; + } else if (convOp[1] != null) { if (tmpR2 == null) { tmpR2 = getColorModel().createCompatibleWritableRaster (r.width, r.height);
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]