[cairo] [cairo-commit] export meta-surface

Chris Wilson chris at chris-wilson.co.uk
Wed Aug 12 17:08:18 PDT 2009


On Wed, 2009-08-12 at 16:51 -0700, Carl Worth wrote:
> I think we need to say a little more here about what width and height
> mean. Do they establish an initial clip extent? If so, is that
> clipping enforced or just possible? (That is, does cairo guarantee
> that rendering outside these bounds will not appear, or does it simply
> say that rendering outside these bounds is undefined?)
> 
> That issue of width and height was really the only thing that kept me
> from exporting meta surfaces almost from the beginning.

It's late so I'm just going to give a few more details here. The extents
passed in here do set a clip on all operations replayed by the
meta-surface. The "hardness" of that clip really depends upon the
backend -- vector surfaces tend to replay the operations exactly (and
add a clip), whereas the fallback surfaces are increasingly discarding
geometry outside the clip. The clip extents are also used in a
non-obvious manner by PDF/PS for creating a source of the right size to
handle a PAD pattern.

Actually this is a property of the replay and not the meta-surface,
except that knowing the extents is useful in determining pattern size
without having to query ink extents. So a bit more thought is needed
here -- as I can see an argument that both are useful. (Though the
replay clipping is just device clipping in another masquerade).
-ickle





More information about the cairo mailing list