[cairo] another pixman issue

Carl Worth cworth at cworth.org
Wed Mar 26 08:38:51 PDT 2008


On Wed, 26 Mar 2008 20:44:37 +1100, "Robert O'Callahan" wrote:
> But the underlying problem I'm working on is that CSS allows background
> images to repeat in only one direction (horizontally or vertically) and
> cairo doesn't support that directly --- we really want CAIRO_EXTEND_PAD on
> one axis and CAIRO_EXTEND_REPEAT on the other. So I have to hack around it
> with temporary surfaces and explicit padding.

Ah, that's an interesting use case. I hadn't heard of that one
before. I don't think it would really make sense to add it directly to
cairo, (none of our backends support it, so we'd always be emulating
it with fallbacks---so we might as well make applications see those
fallbacks and have control over them).

So presumably you could draw with EXTEND_REPEAT to a temporary surface
that's sufficiently enlargened in one dimension and then draw from
that one with EXTEND_PAD to the final. Or you could draw with
EXTEND_PAD to a surface enlargened in the other dimension and then
draw with EXTEND_REPEAT.

And maybe you'll want to code up both and pick the one that uses a
smaller intermediate surface or something?

Good luck!

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080326/7bb3dab5/attachment.pgp 


More information about the cairo mailing list