W3C home > Mailing lists > Public > www-svg@w3.org > February 2001

blending, group rendering

From: Stephane Conversy <conversy@emn.fr>
Date: Mon, 19 Feb 2001 14:39:54 +0100
Message-ID: <3A91222A.9C8D7488@emn.fr>
To: www-svg@w3.org
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 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:20 GMT