Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-597

<filter> element gets clipped, leaves rendering artifacts

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 1.6
    • None
    • GVT Filters
    • None
    • Operating System: Linux
      Platform: Other

    Description

      Things drawn with a <filter> don't get rendered correctly sometimes.
      This only seems to happen with a dynamic document that is modified
      at runtime. I will attach a test program that demonstrates the bug.

      Copy of original email (for some reason this didn't appear
      in the archives yet):

      ------------------------------------------------------------------

      I'm seeing a strange problem and was wondering if this sounds
      familiar to anyone else.

      I'm displaying a dynamic SVG document via JSVGCanvas that contains
      some SVG like this:

      <defs>
      <filter height="200%" id="filter.DropShadow2"
      width="200%" x="-50%" y="-50%">
      <feGaussianBlur in="SourceAlpha" stdDeviation="7"/>
      <feColorMatrix type="matrix"
      values="158 0 0 0 0 0 160 0 0 0 0 0 152 0 0 0 0 0 0.4 0"/>
      <feOffset dx="20" dy="8" result="r2"/>
      <feMerge>
      <feMergeNode in="r2"/>
      <feMergeNode in="SourceGraphic"/></feMerge></filter>
      </defs>

      ..blah blah..

      <g filter="url(#filter.DropShadow2)" id="foo">
      ..blah blah..
      </g>

      The problem is that the width, height, x, and y atributes of
      the <filter> node are being ignored, i.e., the drop shadow is
      being very tightly clipped against the <g> image bounding box
      (it doesn't even appear that the "120%"/"-10%" defaults are
      being applied either).

      HOWEVER- when I export this DOM and then load that into Squiggle,
      it displays properly! I.e, I see all the drop shadow, even though
      the document is supposedly exactly the same.

      Any ideas??

      Thanks,
      -Archie

      __________________________________________________________________________
      Archie Cobbs * CTO, Awarix * http://www.awarix.com

      Attachments

        1. FilterBug.java
          9 kB
          Archie Cobbs

        Activity

          People

            batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
            archie Archie Cobbs
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: