[cairo] svg-mask matrix patch for review

Kai-Uwe Behrmann ku.b at gmx.de
Tue Aug 26 11:33:23 PDT 2008


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
-- 
developing for colour management 
www.behrmann.name + www.oyranos.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: svg_mask.diff
Type: text/x-patch
Size: 2001 bytes
Desc: 
Url : http://lists.cairographics.org/archives/cairo/attachments/20080826/0cc66663/attachment.bin 


More information about the cairo mailing list