[cairo] tile mode in xps, and how to tile through cairo

Olaf Schmidt ng at vbRichClient.com
Tue Mar 24 08:13:28 PDT 2015


Am 23.03.2015 um 14:50 schrieb Michele Cleary:
> I’m seeing a tileMode in an xps 1.fpage, below.*Does anyone know how to
> get Cairographics to show a tile mode?*The xps is showing up on the
> printout as red checks on a clear/no background. This is showing over a
> solid blue triangle. I’m trying to get cairo to do the red check opacity
> mask.
>   "

This is usually done in the Render-Tree with a Push-/PopGroup-sequence
(to create the Pattern) - and in your case the Pattern is not used
for direct (tiled) rendering, but to apply a tiled Mask (to stamp-in
a different color finally, in a follow-up-step).

And "tiled rendering", using a pre-created pattern in cairo (as
a kind of Brush), requires to set its extend-properties usually to:
CAIRO_EXTEND_REPEAT

The code as in this screenshot (in the comments I repeated the XPS-XML)
http://vbRichClient.com/Downloads/CairoSrc.png

...produced the following SVG:
http://vbRichClient.com/Downloads/XPSPage.svg

...which should match with the XPS-rendering-output.

HTH

Olaf



More information about the cairo mailing list