xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edison Too" <edison...@yahoo.com.sg>
Subject GVT problem with GaussianBlur
Date Wed, 11 Jul 2001 13:12:28 GMT

I understand that this question is related to GVT (part of Batik) and not
Batik/SVG directly. If someone can help me with GVT privately, I'd
thankfully refrain from sending GVT questions to the list. Sorry if this
causes inconvenience to you as a list user.

I'm trying to draw a gaussian blurred rectangle on to the Graphics passed in
via the paintComponent(g) call of JComponent. To do this, I call the
paint(g2d,rc) method of a CanvasGraphicsNode I've already set up. This has
only one node set-up as below.

    GraphicsNode aNode = GVTSupport.createShapeNode(new
    GraphicsNodeRenderContext rc = GVTSupport.getRenderContext();
    Filter aFilter =
    aFilter = new GaussianBlurRable8Bit(aFilter,2.0f,2.0F);

GVTSupport is a convenience class with which I construct the node.

The problem is that though the Rectangle is drawn, the gaussian blur didn't
work the way I expected. I can see that the blurring was carried out,but the
pixels were still either red (the fill color) or white (the background
color). Instead of a blurred edge with color changing from red to white, I
see a distinct edge. I can tell that blurring has occurred because, the
resultant rectangle has rounded corners and is larger than the original

I suspect it is some kind of color space issue, but I couldn't figure out
what I did wrong. If anyone could see it, please let me know. Thanks in
advance. :)


Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org

View raw message