[cairo] svg-mask matrix patch for review

Behdad Esfahbod behdad at behdad.org
Tue Aug 26 11:43:40 PDT 2008


Hi Kai-Uwe,

Can you please also write a test case for the test suite that exposes the bug
and the fix?

Thanks,

behdad

Kai-Uwe Behrmann wrote:
> Hello,
> 
> The expected behaviour for masking in Cairo is to set the mask according 
> to the current active matrix and apply unchanged to a to be masked 
> surface.
> 
> In SVG the mask element is bound to the masked object and thus the local 
> matrix from that image object applies to the nested mask as well.
> 
> Attached is a small patch for substracting the matrix of a image
> surface from the matrix of the mask to comply to Cairo's behaviour.
> I did not test for other stuff like vectors or text and would expect this 
> part is not completed.
> 
> After the patch masked images appear equal on __all__ types of 
> output: PNG, PDF and SVG. I checked the SVG with rsvg, Inkscape and 
> Mozilla and compared with a png viewer and Acroread for PDF output.
> 
> 
> kind regards
> Kai-Uwe Behrmann
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo


More information about the cairo mailing list