blending, group rendering

Hello.

I have a few questions about blending operations.
Take for example the test masking-groupOpac-BE-04.svg

In the 4th group, we have:

 <g style="opacity:0.5">
   <rect x="60" y="290" width="80" height="40" style="fill:blue;
opacity:.5"/>
   <rect x="70" y="310" width="80" height="40" style="fill:lime;
opacity:.5"/>
  </g>

To render it, we can render the two rectangles in an offscreen
image, then take the result, and blend it into the final image.

The problem is that according to the spec, the alpha values
of the pixels in the offscreen image are not all equal to either 0
(where there was no drawings) or 1 (where there was actual drawings),
since both of the rects have an opacity of 0.5, and the alpha
values should follow the equation Ca'=1-(1-Ea)x(1-Ca) (CR p267).

So, when blending the offscreen image into the resulting one, when
multiplying by 0.5 (group opacity), we will eventually have
a clearer image than the one in the .png file. If one wants
the result in the .png file, one should "ignore" the alpha values of the
pixels
in the offscreen image.

Obviously, I should have missed something...

    stef

btw, all the tests file have a white background. It's not defined in the
.svg file,
and I couldn't find any reference to such an implicit background in the
CR.
Is it written somewhere ?


--
stephane conversy
ecole des mines de nantes

Received on Monday, 19 February 2001 08:40:15 UTC