[cairo] On recovery from errors in cairo (was: cairo reset)

Owen Taylor otaylor at redhat.com
Fri Sep 22 11:30:57 PDT 2006


On Fri, 2006-09-22 at 14:23 -0400, Behdad Esfahbod wrote:

>   1) No other value in cairo_scale causes an error state, and so having
> all infinitesimal values work as expected but zero not working is
> suprising.
> 
>   2) Scaling to zero *is* well-defined afterall!

Well, except that we have infinite-extent operations.

What should you get from:

 cairo_scale(cr, 0, 0);
 cairo_set_source_image(cr, my_pattern, 0, 0);
 cairo_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT);
 cairo_paint();

? I guess you could argue that it should be a solid fill with the
average pixel color of the pattern...

I'd agree that it would be nice if:

 cairo_scale(cr, 0, 0);
 cairo_set_source_image(cr, my_image, 0, 0);
 cairo_paint();

Drew nothing without setting an error .. I had to help one of my
coworkers (Havoc, in fact) figure out what was going on with that the
other day.

					 Owen




More information about the cairo mailing list