Hi,
I just checked into trunk a fix for Cairo export of masked objects (bug 597974). In tracing the problem I came across another mask related problem. Inkscape is calculating the value of the mask wrong for screen display. The value of the mask is suppose to be calculated using "the luminance-to-alpha coefficients (as defined in the 'feColorMatrix' filter primitive)" on linear RGB values. At the moment, Inkscape is combining the RGB values with equal weight. This leads to a noticeable difference between Inkscape screen display and the Cairo based exports, as well as display in browsers. I am guessing that sRGB color values are being used in addition, although I don't see a noticeable difference when comparing Inkscape PDF output or corrected screen display output with Batik or Firefox rendering.
The code to fix is in nr-arena-item.cpp at line 518 and 536... but as this is speed critical code, I don't know the best way of doing this. Can someone who is familiar with nr-pixops, etc. have a look?
This is the current code:
m = NR_PREMUL_112 (s[0] + s[1] + s[2], s[3]); d[0] = FAST_DIV_ROUND < 3 * 255 > (m);
This is the desired code equivalent:
d[0] = (int)((s[0]*0.2125 + s[1]*0.7154 + s[2]*0.0721) * s[3]/255.0);
Tav