[cairo] Meta surface update and new ps surface

Kristian Høgsberg krh at bitplanet.net
Thu Jun 23 11:02:01 PDT 2005


Kristian Høgsberg wrote:
> Carl Worth wrote:
...
>> This allows the meta-surface to treat NULL as a legitimate pattern. I
>> think that makes sense, but this should happen in
>> _cairo_pattern_init_copy instead, (and the result should be
>> communicated with pattern->status == CAIRO_STATUS_NULL_POINTER rather
>> than returning NULL). So the three functions above should disappear I
>> think.
> 
> Thinking a bit about this approach, I'm not sure I like it.  You're
> suggesting making _cairo_pattern_init_copy (&pattern, NULL) initialize
> 'pattern' to an error object (pattern.status ==
> CAIRO_STATUS_NULL_POINTER) but the cases I'm trying to handle are
> situations were a NULL pattern is entirely legal.  For example, when
> passing a NULL mask pattern to surface->backend->composite.

Hmm, all this is all nonsense -- I just realized that the only situation 
where a pattern can legally be NULL is the mask pattern in 
surface->backend->composite.  In all other combinations, the pattern is 
the source and obviously can't be NULL.  So my inclination at this point 
is to just work around it in that one place and not change anything in 
cairo-pattern.c.

Kristian



More information about the cairo mailing list