Re: painting-render-02-b.svg

> All white rects have the same transparency level and are drawn onto a 
> solid black background. Just the rects on the first row are filled with 
> either #7F7F7F or #BBBBBB but don't test color-interpolationat all.
>> Yes. On both the source and the background.
> Ok, this is maybe the point where I have the understanding problems. I 
> still read the Spec this way: At first we have the canvas, where 
> everything is drawn on by the compositing algorithm mentioned on thelink  
> you posted.
> Now we want to draw a shape onto this canvas in the color spacelinearRGB  
> while the canvas itself is in sRGB.
>For a better understanding I'll take a surface/buffer where I draw the 
> shape onto. This surface with the shape gets transformed to linearRGB. 
> Now I draw this surface on the canvas by compositing it with the 
> algorithm of the spec respecting the transparence that is set by the 
> property 'fill-opacity'.
>For the example on the test suite, it means we would draw the rect onto 
> the canvas with the fill color white. Now we transform this surface to 
> linearRGB. But because we filled the shape with white: rgb(255,255,255) 
> the linearRGB transformation doesn't influence the surface. According to 
> the sRGB to linearRGB algorithm of the Spec, the resulting color values 
> are rgb(255,255,255).
> At the end we draw the surface on the canvas with the 'fill-opcity:0.5' 
> by compositing it to the canvas.
>The background is black, so we see the same gray independent if we draw 
> the rect with linearRGB or sRGB.
> We might of course see a difference if we'd use another fill color than 
> white. But I don't get it why we should see a difference on this test.

Because the alpha blending is done in linear RGB, and needs to be  
converted back to the parent's (canvas') color space.

Background = sRGB(0, 0, 0) => linRGB(0, 0, 0)
Foreground = sRGB(1.0, 1.0, 1.0) => linRGB(1.0, 1.0, 1.0)
Opacity = 0.5
Result = linRGB(0.5, 0.5, 0.5) => sRGB(0.735, 0.735, 0.735)

Received on Wednesday, 9 February 2011 19:34:37 UTC