Forum Bugs

Inherited SVG transparency

jmh
I've noticed incorrect opacity in a lot of the SVG images I'm using (produced by the Inkscape editor).

 
<g transform="matrix(1.25,0,0,-1.25,1.823375,-6.25e-4)"
     id="g25622"
     style="opacity:0.44999701">
    <path
       d="m 0,0 c 0,0 -1.459,0 -1.459,-1.459 l 0,-5.835 c 0,0 0,-1.459 1.459,-1.459 l 5.836,0 c 0,0 1.459,0 1.459,1.459 l 0,5.835 c 0,0 0,1.459 -1.459,1.459 L 0,0 z"
       id="path25624"
       style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" />
  </g>


The above is shown with no opacity. It displays correctly if I remove "fill-opacity:1" from the path.

The path opacity is overriding the group opacity. In other SVG renderers the group opacity alters the opacity of everything inside it.
jmh
Attached is an example svg file. Firefox shows four squares with differing transparency. Prince shows four white squares.

edit: SVG attachments aren't allowed. Here's the full file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   version="1.1"
   width="164.09375"
   height="92.362411"
   id="svg90309">
  <defs
     id="defs90311">
    <clipPath
       id="clipPath25578">
      <path
         d="m 372.377,42.53 48.143,0 0,8.753 -48.143,0 0,-8.753 z"
         id="path25580" />
    </clipPath>
    <clipPath
       id="clipPath25614">
      <path
         d="m 371.347,52.3128 10.813,0 0,-10.8119 -10.813,0 0,10.8119 z"
         id="path25616" />
    </clipPath>
    <clipPath
       id="clipPath25630">
      <path
         d="m 384.478,52.3128 10.811,0 0,-10.8119 -10.811,0 0,10.8119 z"
         id="path25632" />
    </clipPath>
    <clipPath
       id="clipPath25646">
      <path
         d="m 397.607,52.3128 10.812,0 0,-10.8119 -10.812,0 0,10.8119 z"
         id="path25648" />
    </clipPath>
    <clipPath
       id="clipPath25662">
      <path
         d="m 410.737,52.3128 10.812,0 0,-10.8119 -10.812,0 0,10.8119 z"
         id="path25664" />
    </clipPath>
  </defs>
  <path
     d="m 0,92.36241 164.09375,0 L 164.09375,0 0,0 0,92.36241 z"
     id="path14"
     style="fill:#1c4f9c;fill-opacity:1;fill-rule:nonzero;stroke:none" />
  <g
     transform="matrix(1.25,0,0,-1.25,56.727395,40.953645)"
     id="g25622"
     style="opacity:0.44999701">
    <path
       d="m 0,0 c 0,0 -1.459,0 -1.459,-1.459 l 0,-5.835 c 0,0 0,-1.459 1.459,-1.459 l 5.836,0 c 0,0 1.459,0 1.459,1.459 l 0,5.835 c 0,0 0,1.459 -1.459,1.459 L 0,0 z"
       id="path25624"
       style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" />
  </g>
  <g
     transform="matrix(1.25,0,0,-1.25,73.14027,40.953645)"
     id="g25638"
     style="opacity:0.35000604">
    <path
       d="m 0,0 c 0,0 -1.459,0 -1.459,-1.459 l 0,-5.835 c 0,0 0,-1.459 1.459,-1.459 l 5.835,0 c 0,0 1.459,0 1.459,1.459 l 0,5.835 c 0,0 0,1.459 -1.459,1.459 L 0,0 z"
       id="path25640"
       style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" />
  </g>
  <g
     transform="matrix(1.25,0,0,-1.25,89.55277,40.953645)"
     id="g25654"
     style="opacity:0.25">
    <path
       d="m 0,0 c 0,0 -1.46,0 -1.46,-1.459 l 0,-5.835 c 0,0 0,-1.459 1.46,-1.459 l 5.835,0 c 0,0 1.459,0 1.459,1.459 l 0,5.835 c 0,0 0,1.459 -1.459,1.459 L 0,0 z"
       id="path25656"
       style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" />
  </g>
  <g
     transform="matrix(1.25,0,0,-1.25,105.96515,40.953645)"
     id="g25670"
     style="opacity:0.14999402">
    <path
       d="m 0,0 c 0,0 -1.46,0 -1.46,-1.459 l 0,-5.835 c 0,0 0,-1.459 1.46,-1.459 l 5.835,0 c 0,0 1.459,0 1.459,1.459 l 0,5.835 c 0,0 0,1.459 -1.459,1.459 L 0,0 z"
       id="path25672"
       style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" />
  </g>
</svg>
mikeday
Thanks, we'll take a look at this issue.
have
It seems like you forgot to resolve this :-) ... I now have to changed opacity values with solid colours, which is quite tiring.