[cairo] svg-mask matrix patch for review
Kai-Uwe Behrmann
ku.b at gmx.de
Wed Aug 27 12:36:51 PDT 2008
Hello Behdad,
the attached files cover the test code, a Makefile.am diff and a
reference png. The test behaves different for the patched and the
unpatched git Cairo's.
kind regards
Kai-Uwe Behrmann
--
developing for colour management
www.behrmann.name + www.oyranos.org
Am 26.08.08, 14:43 -0400 schrieb Behdad Esfahbod:
> 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:
> > 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: svg-mask-matrix.c
Type: text/x-csrc
Size: 4010 bytes
Desc:
Url : http://lists.cairographics.org/archives/cairo/attachments/20080827/c1032e9d/attachment-0001.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: svg-mask-matrix-ref.png
Type: image/png
Size: 50605 bytes
Desc:
Url : http://lists.cairographics.org/archives/cairo/attachments/20080827/c1032e9d/attachment-0001.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: svg-mask-matrix.diff
Type: text/x-patch
Size: 674 bytes
Desc:
Url : http://lists.cairographics.org/archives/cairo/attachments/20080827/c1032e9d/attachment-0001.bin
More information about the cairo
mailing list